FORUMS
Remove All Ads from XDA

[PX5] MTCE Button remapping Tutorial for Malaysk / mtce-utils

124 posts
Thanks Meter: 23
 
By gforums, Senior Member on 18th November 2018, 11:30 AM
Post Reply Email Thread
Hi there,

after struggling around with the mcte utils settings.ini file to remap buttons, I tought I might share what I learned.

This assumes, you have installed xposed, activated the mtce-utils module and placed the settings.ini file at your internal sc card (/storage/emulated/0).

Here's how to remap buttons:

PHP Code:
[android.microntek.service#keys]
# In this section, you have to put all GLOABL remap functions into. You can use the following ways or remapping:
# note: xxx always stands for the mtc-keycode. If you do not know them, you can use MTCD Tools -> Creata new bnding -> Obtain key sequence to get the key codes.

app_xxx=com.spotifiy.music
#--> this defines to launch any app, e.g. app_257 would in my case launch spotify when pressig OK button.

keycode_xxx 4
# ---> with the keycode command, you can assign android keycodes.  For example "4" is the back button, "87" is media next.
# a full list of android codes can be found here: https://android.googlesource.com/platform/frameworks/native/+/master/include/android/keycodes.h

activity_xxx com.zoulou.dab/com.zoulou.dab.MainActivity
# --> this is to launch any activity. Always put a pair of app/activity with a slash in between. My example starts the DAB App.

intent_xxx= [any android intent action]
#--> this is to assign an intent. Couldn't test it yet.

keymtc_xxxyyy
# --> this is used to reassign another mtc key.

[com.microntek.radio#keys]
# to remap buttons within specific apps, create an extra section which contains the app name [B][app.name#keys][/B]
# same as with global remapping, put the codes here as you which to reassign keys within special apps. 
Well hope that makes the settings more clear for you.

BR
Christian
The Following 6 Users Say Thank You to gforums For This Useful Post: [ View ] Gift gforums Ad-Free
 
 
18th November 2018, 03:04 PM |#2  
OP Senior Member
Thanks Meter: 23
 
More
I just made some small corrections to the above post and want to share my settings with you:

What did I actually do?
  • I changed the two steering wheel keys "Mode" and "List" to Keycodes 219 and 4. 219 launches Google Assitant, 4 is to go back. This way, I can easily launch Google Assistand for calls, navigation and spotify, tunein and can minimize if needed.
  • I assigned keycodes 87/88 to both forward/backwards keys, so that I in most apps can go forward/backward
  • I assigned my favorite apps to the buttons 1-6, which are DAB, TuneIn, Spofity, FM Radio app, Google Maps and Bluetooth Phone
  • So I can switch easily between all those apps. As the radio app has its own buttons assigned, here the keys 1-6 are still used as usual.
  • What doesn't work is the part where I wanted to fix wrong forward/backward keys in radio app. Assigning backward to forward and vice versa leads to a crashing radio app (behaves like non ending loop then)

PHP Code:
[android.microntek.service#keys]
activity_331=com.zoulou.dab/com.zoulou.dab.activity.MainActivity
keycode_365
=4
keycode_276
=87
keycode_278
=88
keycode_256
=219
activity_283
=com.zoulou.dab/com.zoulou.dab.activity.MainActivity
app_284
=tunein.player
activity_285
=com.spotify.music/com.spotify.music.MainActivity
activity_286
=com.microntek.radio/com.microntek.radio.MainActivity
app_287
=com.google.android.apps.maps
app_288
=com.hb.dialer.free

[com.microntek.radio#keys] 
keycode_276=90
keycode_278
=89
activity_331
=com.zoulou.dab/com.zoulou.dab.MainActivity 
Hope this helps!
Christian
The Following User Says Thank You to gforums For This Useful Post: [ View ] Gift gforums Ad-Free
15th December 2018, 12:44 AM |#3  
Junior Member
Thanks Meter: 0
 
More
I can not make settings.ini work, do you paste the file in / storage / emulated / 0 directly or put it in the mtce-utils folder?
15th December 2018, 02:31 PM |#4  
Junior Member
Thanks Meter: 0
 
More
Hy @gforums,

thanks for the little tutorial.
Unfortunately, changing the steering wheel buttons does not work.
I am currently using Android Oreo with the Malaysk Rom.

Enclosed my settings.ini

Code:
[android.microntek.service#keys] 
keycode_258=87
keycode_316=88
@elavaro19:
as I understand it you have to put the ini file directly into the directory /storage/emulated/0.

BR
gary822
17th December 2018, 04:01 PM |#5  
Junior Member
Thanks Meter: 0
 
More
@gary822 I'll try like this, I can not assign buttons for canbus and I want to remap some buttons between them the aux button to home
25th December 2018, 07:37 AM |#6  
twist's Avatar
Senior Member
Thanks Meter: 82
 
More
Dude, this is awesome stuff! Thank you so much for sharing what you learned!
27th December 2018, 02:39 AM |#7  
Senior Member
Flag aachen
Thanks Meter: 14
 
More
But where can i find out wich key on my sterlingwhel has wich keycode?
8th January 2019, 08:48 PM |#8  
OP Senior Member
Thanks Meter: 23
 
More
Quote:
Originally Posted by kaderekusen

But where can i find out wich key on my sterlingwhel has wich keycode?

I've used mtcd tools, option to select a new binding and then pressing the key I want to assign. Mtcd tools should show you the mtce key code then.
8th January 2019, 08:50 PM |#9  
OP Senior Member
Thanks Meter: 23
 
More
Quote:
Originally Posted by kaderekusen

But where can i find out wich key on my sterlingwhel has wich keycode?

Quote:
Originally Posted by gary822

Hy @gforums,

thanks for the little tutorial.
Unfortunately, changing the steering wheel buttons does not work.
I am currently using Android Oreo with the Malaysk Rom.

Enclosed my settings.ini

Code:
[android.microntek.service#keys] 
keycode_258=87
keycode_316=88
@elavaro19:
as I understand it you have to put the ini file directly into the directory /storage/emulated/0.

BR
gary822

Did you reboot after changing the settings.ini? This is needed. Have you also activated the xposed-mtce-utils module? And checked whether the mtce key codes used are the right ones?
Are you on Malaysk?
7th February 2019, 09:25 PM |#10  
Member
Thanks Meter: 30
 
More
I think I may have found the solution to this. I'll post it here if it works.
13th February 2019, 10:40 PM |#11  
Member
Thanks Meter: 3
 
More
Quote:
Originally Posted by mattj949

I think I may have found the solution to this. I'll post it here if it works.

hello, Any news ?
Post Reply Subscribe to Thread

Guest Quick Reply (no urls or BBcode)
Message:
Previous Thread Next Thread
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes