found a way to remap back and menu buttons - Galaxy S III Q&A, (US Carriers)

See post#9 for instructions...

Root and use button remapper app, found somewhere here on this Site
Sent from my SGH-I747M using xda premium

trincisor said:
Root and use button remapper app, found somewhere here on this Site
Sent from my SGH-I747M using xda premium
Click to expand...
Click to collapse
I am rooted and I tried button remapper for galaxy s but it said it wasn't compatible with s3 so I tried the regular version but it didn't work. I was just wanting to know if anyone got it to work and how.

Bump
t-mobile stock rom/rooted

there should be a file in /system/user/keylayout/ one of those can be edited to remap. I can give it a try later.
Sent from my SAMSUNG-SGH-I747 using xda app-developers app

sublimejosh2000 said:
there should be a file in /system/user/keylayout/ one of those can be edited to remap. I can give it a try later.
Sent from my SAMSUNG-SGH-I747 using xda app-developers app
Click to expand...
Click to collapse
Thank you....please let me know if you figure it out.
t-mobile stock rom/rooted

Bump

Anyone
t-mobile stock rom/rooted

OK so I figured it out for anyone who is also interested in this, and its very easy. First of all I keep my back light off on the touch keys so there's no confussion. But I did that before switching them anyway...its just the way I like it. So you go to system/usr/keylayout/sec_touchkey.kl and open with text editor. There are numbers followed by the key action. Just edit the key action to what you want(Make sure its in all caps). in my case I changed menu to back and back to menu. I then pressed the menu soft key and pressed save changes. It actually creates a new sec_touchkey.kl file and renames the old one to a .bak file. Just reboot and your good......
t-mobile sgs3 stock rom/rooted

dls5375 said:
OK so I figured it out for anyone who is also interested in this, and its very easy. First of all I keep my back light off on the touch keys so there's no confussion. But I did that before switching them anyway...its just the way I like it. So you go to system/usr/keylayout/sec_touchkey.kl and open with text editor. There are numbers followed by the key action. Just edit the key action to what you want(Make sure its in all caps). in my case I changed menu to back and back to menu. I then pressed the menu soft key and pressed save changes. It actually creates a new sec_touchkey.kl file and renames the old one to a .bak file. Just reboot and your good......
t-mobile sgs3 stock rom/rooted
Click to expand...
Click to collapse
any idea how to make longpress on home key open google voice search?

dls5375 said:
OK so I figured it out for anyone who is also interested in this, and its very easy. First of all I keep my back light off on the touch keys so there's no confussion. But I did that before switching them anyway...its just the way I like it. So you go to system/usr/keylayout/sec_touchkey.kl and open with text editor. There are numbers followed by the key action. Just edit the key action to what you want(Make sure its in all caps). in my case I changed menu to back and back to menu. I then pressed the menu soft key and pressed save changes. It actually creates a new sec_touchkey.kl file and renames the old one to a .bak file. Just reboot and your good......
t-mobile sgs3 stock rom/rooted
Click to expand...
Click to collapse
Mine is currently set up as:
key 139 HOME
key 158 BACK
key 102 MENU
key 217 SEARCH
The menu key now goes HOME, cool. The back key still goes BACK, great. Search still goes to SEARCH, awesome.
But the home key still goes HOME. I can't figure out why. Any ideas?
edit: Nevermind, I just realized this file is only for touch keys. By editing sec_keys.kl I was able to achieve the results I wanted.

I'm curious if we could change the back key to a RECENTS key. Like the nexus.
Sent from my SCH-I535 using xda app-developers app

Has anyone found what tells the home button to call up recents when held?
Sent from my SCH-I535 using xda app-developers app

Hmm new to android here, be gentle. I too would like to know how to remap the RECENTS key. I would love to swap MENU and RECENTS. I bought Root Explorer and checked out all the files, didn't see anything that had "RECENTS" in it.

Seems like a ton of people want the hold-for-open-apps button and menu key swapped. It would make multitasking sooo much better.

Related

[Q] Customize Hardware Keys

I was wondering if anyone knows a way to change the function of any of the four hardware keys at the button of the device.
For example, I do no use nor like the search key. So I was wondering if there was a way to change it so when I tap on it the applications drawer would open instead.
Any help would be awesome, thanks
I was going to suggest Button Remapper, until I saw that you wanted to open your app drawer with the search button. I used it to make the search button duplicate the menu button action for a while, but ended up changing it back.
http://forum.xda-developers.com/showthread.php?t=850464
I don't have a ton of experience with Tasker, but you might be able to get Tasker to do it.
I will check it out. Thank you
Yea button remapper best i could think of i use it turn my search key into the camera button
Sent from my SAMSUNG-SGH-I717 using XDA
Looks like there is no option to change to open the app drawer. Worth a shot
zayydubb said:
Yea button remapper best i could think of i use it turn my search key into the camera button
Sent from my SAMSUNG-SGH-I717 using XDA
Click to expand...
Click to collapse
Sorry to raise an older thread, however, I am curious if you needed to do anything other than install / run the remapper app?
I am trying to get it to work, to no avail. It opens, I see the options, I change the functions from search to camera, save, apply. After I reboot, it still does the search, no camera. The remapper program also sees the 'saved' functions of camera, but still no luck.

Search Key Function

Is there any possible way to change the search key function to be the power instead of search. I am on cm9dx2 and I tried the button remapper APK and it didn't work it would reboot every time I hit apply with no results.
Sent from my MB870 using xda premium
You can change it by modifying the file tegra-kbc.kl located in /system/usr/keylayout. I forget what to change. Let me get back to you on that.
EDIT: Ok, change the line that says
key 217 SEARCH WAKE_DROPPED
to
key 217 POWER WAKE
Then reboot for it to take effect.
Thanks alot. Worked great
Sent from MB870 on Cm9dx2 using XDA Premium
I think we should have a sticky with this and other key layout options, we are a year and then some into this phone and I'm sure everyone who is still on thier first dx2 are all feeling the power button start to die
cm7dx2
LordRalh3 said:
I think we should have a sticky with this and other key layout options, we are a year and then some into this phone and I'm sure everyone who is still on thier first dx2 are all feeling the power button start to die
cm7dx2
Click to expand...
Click to collapse
My button is definitely wearing down. Its not so clicky anymore. It still works though. But its good to know that if it does completely go out, I have this option.

[Q] Remap Search Button to Recent Apps (ICS)

I'm wondering if it's possible to remap the capacitive Search button to open up the ICS Recent Apps menu instead, exactly like described in this thread:
http://forum.xda-developers.com/showthread.php?p=21501238
I'm on stock OTA 4.0.4 rooted, but I'm not sure if a custom rom has this functionality or I have to try to make it myself (no idea how!). There seem to be mods but are for other devices.
Currently if I modify the cy8c201xx.kl in /keylayout (i.e. change SEARCH to APP_SWITCH) it just opens up the old gingerbread app switcher.
Hmm.. This shouldn't be too hard to do.. I'll have a few friends of mine take a look into it with me, and come back with what I find They're long-time Android Hackers
EDIT: Talking with my friends, will be working on trying to get this to work Can't promise anything, but I'll sure try to get it working! lol.. It would be something that I want too
_patrickc_ said:
Hmm.. This shouldn't be too hard to do.. I'll have a few friends of mine take a look into it with me, and come back with what I find They're long-time Android Hackers
EDIT: Talking with my friends, will be working on trying to get this to work Can't promise anything, but I'll sure try to get it working! lol.. It would be something that I want too
Click to expand...
Click to collapse
That would be absolutely fantastic and much appreciated, thanks! :good:
Talked to one of my friends, he said it shouldn't be hard, but he didn't know exactly how to do it. Going to bed now, will look more into it tomorrow
Sent from my RAZR MAXX using XDA premium
Any breakthrough ?
It's the last missing thing on this phone !
ulybu said:
Any breakthrough ?
It's the last missing thing on this phone !
Click to expand...
Click to collapse
Try Long press home button
whirleyes said:
Try Long press home button
Click to expand...
Click to collapse
Yeah sure, but we're trying to get it from the search key we never use..
I also get the GB recent app screen
Sent from my XT910 using xda premium
ulybu said:
Yeah sure, but we're trying to get it from the search key we never use..
I also get the GB recent app screen
Sent from my XT910 using xda premium
Click to expand...
Click to collapse
Hi, I found this on another Droid Forum:
You just need to edit the corresponding key mapping file in /system/usr/keylayout/ to make the changes you want. On my Razr Maxx the file that controls the 4 capacitive buttons is named cy8c201xx.kl. To swap the key functions you just change the word next to the key number: i.e. replace SEARCH with MENU and vice versa. Make sure to backup your original just in case.
You can set it to any function that is defined (POWER, AUTO_ROTATION, VOLUME_UP, etc.) you just need to know the proper name. I have read that recent apps may be APP_SWITCH but I have not tested it myself. I do not know how to create a new function if it is not already defined.
Hope it helps.
prabbie said:
Hi, I found this on another Droid Forum:
You just need to edit the corresponding key mapping file in /system/usr/keylayout/ to make the changes you want. On my Razr Maxx the file that controls the 4 capacitive buttons is named cy8c201xx.kl. To swap the key functions you just change the word next to the key number: i.e. replace SEARCH with MENU and vice versa. Make sure to backup your original just in case.
You can set it to any function that is defined (POWER, AUTO_ROTATION, VOLUME_UP, etc.) you just need to know the proper name. I have read that recent apps may be APP_SWITCH but I have not tested it myself. I do not know how to create a new function if it is not already defined.
Hope it helps.
Click to expand...
Click to collapse
Can anyone confirm making this work? Search button really IS useless
Sent from my DROID RAZR using Tapatalk 2
i love the search button... especially the long press to bring up sound hound search and others
Sent from my DROID RAZR using Tapatalk 2
imdaman99 said:
Can anyone confirm making this work? Search button really IS useless
Sent from my DROID RAZR using Tapatalk 2
Click to expand...
Click to collapse
Works Great on my XT912. I can now lock my screen by short pressing the cap search
I know that on phones that you have to use the power button to lock/unlock it is usally the first button to fail.
Now I need to figure out how to wake using a cap button.
Here's the original
Code:
key 158 BACK WAKE_DROPPED VIRTUAL
key 139 MENU WAKE_DROPPED VIRTUAL
key 217 SEARCH WAKE_DROPPED VIRTUAL
key 102 HOME WAKE VIRTUAL
Here's what I changed
Code:
key 158 BACK WAKE_DROPPED VIRTUAL
key 139 MENU WAKE_DROPPED VIRTUAL
key 217 POWER WAKE_DROPPED VIRTUAL
key 102 HOME WAKE VIRTUAL
imdaman99 said:
Can anyone confirm making this work? Search button really IS useless
Sent from my DROID RAZR using Tapatalk 2
Click to expand...
Click to collapse
I just did this change on my Razr and it does work, but it brings up the GB sytle of switcher.
borgdog said:
I just did this change on my Razr and it does work, but it brings up the GB sytle of switcher.
Click to expand...
Click to collapse
yes, me2. brings up GB style only .....

Remap Hardware Buttons?

So I want to remap the hardware buttons, but ran into some issues:
google searches say to edit the /system/usr/keylayout/sec_touchkey.kl (for previous galaxy devices), but this file is mysteriously absent on my stock rooted s4.
I tried other files in this /system/usr/keylayout/ folder; atmel_mxt_ts.kl seemed promising in its content:
Code:
key 139 MENU
key 102 HOME
key 158 BACK
key 217 SEARCH
Changing these, however, did nothing.
Am I searching in the right place, just in the wrong files? Is there a file chmod permission I might be missing?
I think there was also a jar file (android.policy.jar?) I'd have to decompile if I wanted to change the long-press actions for these buttons?
Can I override the double-press home button to do something different than s-voice? (I know I can disable the app itself)
Thanks!
disable the button
Mix3d said:
So I want to remap the hardware buttons, but ran intofiles into some issues:
google searches say to edit the /system/usr/keylayout/sec_touchkey.kl (for previous galaxy devices), but this file is mysteriously absent on my stock rooted s4.
I tried other files in this /system/usr/keylayout/ folder; atmel_mxt_ts.kl seemed promising in its content:
Code:
key 139 MENU
key 102 HOME
key 158 BACK
key 217 SEARCH
Changing these, however, did nothing.
Am I searching in the right place, just in the wrong files? Is there a file chmod permission I might be missing?
I think there was also a jar file (android.policy.jar?) I'd have to decompile if I wanted to change the long-press actions for these buttons?
Can I override the double-press home button to do something different than s-voice? (I know I can disable the app itself)
Thanks!
Click to expand...
Click to collapse
I was also looking all over for this. Did what you did and also other. kl in the system usr no change also . Using 3minit mod. Wanted to disable the hardware button as having the navigation bar and therefore now having two back button.
Anyone here with any idea to share?
kelvinator said:
I was also looking all over for this. Did what you did and also other. kl in the system usr no change also . Using 3minit mod. Wanted to disable the hardware button as having the navigation bar and therefore now having two back button.
Anyone here with any idea to share?
Click to expand...
Click to collapse
i dont have an S4 at the moment and i cant remember the exact file name but its under system/usr/keylayout looking through a rom file i think its gpio-keys.kl just mount the folder as read/write then comment out the lines you dont want using # then reboot
what did you do to enable the navbar when i had i was using an S4 last week the only way i could get it working was with an AOSP rom which meant no samsung camera or IR
*edit i should add that this was on the verizon S4
success disable hardware back button
I finally managed to disable the button. Its in system/usr/generic.kl . Place# infront of key 159 back and reboot. Done.
Got navigation bar using 3minit setting and mod.
If it works for you hitting the Thanks button will help. Cheers
---------- Post added at 05:28 AM ---------- Previous post was at 05:25 AM ----------
Correction. In system/usr/keylayout/generic.kl.
I am on omega v6.0 with 3minit mod.
kelvinator said:
I finally managed to disable the button. Its in system/usr/generic.kl . Place# infront of key 159 back and reboot. Done.
Got navigation bar using 3minit setting and mod.
If it works for you hitting the Thanks button will help. Cheers
---------- Post added at 05:28 AM ---------- Previous post was at 05:25 AM ----------
Correction. In system/usr/keylayout/generic.kl.
I am on omega v6.0 with 3minit mod.
Click to expand...
Click to collapse
Good to know, but my use case is a little different... I'm hoping to swap/ change the soft keys, not disable.
But if generic.kl worked for you, that's a good place for me to start. Will play around and post back if I can swap the menu/back button, hopefully the long press options as well. Ideally I want to move a lot of things around, (long press home for gnow, back to recent, long for menu, menu to back) but we'll see.
I'm on stock rooted, which is why I still need functionality
based on how I see it. I think it could be done
I will try it out if I could swap the menu and home like how you wanted. But you definitely need to be rooted first to edit the files
tried it changing key 139 MENU with BACK. saved reboot with success. Menu function swap to back function.
rem you got to be rooted for this to work. ..
kelvinator said:
I will try it out if I could swap the menu and home like how you wanted. But you definitely need to be rooted first to edit the files
tried it changing key 139 MENU with BACK. saved reboot with success. Menu function swap to back function.
rem you got to be rooted for this to work. ..
Click to expand...
Click to collapse
Is a long press registered as a different key for mapping purposed?
Like menu button is 001 but long press menu is 002?
Ultimately I'd like to be able to make a long press on the home button turn the screen off. That's my end goal with that question.
Mix3d said:
Good to know, but my use case is a little different... I'm hoping to swap/ change the soft keys, not disable.
But if generic.kl worked for you, that's a good place for me to start. Will play around and post back if I can swap the menu/back button, hopefully the long press options as well. Ideally I want to move a lot of things around, (long press home for gnow, back to recent, long for menu, menu to back) but we'll see.
I'm on stock rooted, which is why I still need functionality
Click to expand...
Click to collapse
In the generic.kl file, just change the labels to what you want. For instnace, where it says 117 VOLUME_UP WAKE (thats just an example) remove the volume_up and put MENU or BACK or whatever you want there.
Skipjacks said:
Is a long press registered as a different key for mapping purposed?
Like menu button is 001 but long press menu is 002?
Ultimately I'd like to be able to make a long press on the home button turn the screen off. That's my end goal with that question.
Click to expand...
Click to collapse
The system interupts the key down press, it then launches a post delayed runnable when you press down, if the key is pressed down for the length of that post delayed, then essentially "long press" has been executed. The runnable then consumes the the original key press to prevent the key from executing.
elesbb said:
In the generic.kl file, just change the labels to what you want. For instnace, where it says 117 VOLUME_UP WAKE (thats just an example) remove the volume_up and put MENU or BACK or whatever you want there.
The system interupts the volume down press, it then launches a post delayed runnable when you press down, if the key is pressed down for the length of that post delayed, then essentially "long press" has been executed. The runnable then consumes the the original key press to prevent the key from executing.
Click to expand...
Click to collapse
Right, so then how do we override the long press?
Mix3d said:
Right, so then how do we override the long press?
Click to expand...
Click to collapse
If you are trying to do it via the system. Meaning overriding system button presses, then you will have to edit the smali code. I believe the method is interceptKeyBeforeQueing or something like that.
where the hell is the 'soft' back button on this phone? so annoying i can't find it! or do i need to use a 3rd party launcher and rid of that stock touchwiz crap...phone is not rooted
cobyman7035 said:
where the hell is the 'soft' back button on this phone? so annoying i can't find it! or do i need to use a 3rd party launcher and rid of that stock touchwiz crap...phone is not rooted
Click to expand...
Click to collapse
You are in the wrong place, bud. Please ask questions like this in the q and a forum. This is a development forum for development related discussion.
And do try to be a tad calmer when posting. There are tons of people who will be happy to help. But the aggressive tone of your post will prevent many people from wanting to assist.
Also...really? Its the arrow to the right of the home button on the bottom right of the phone.
Sent from your phone. You should be careful where you leave that thing.
Found this at the AOSP Site:
http://source.android.com/tech/input/key-layout-files.html
Key layout files are located by USB vendor, product (and optionally version) id or by input device name.
The following paths are consulted in order.
Code:
/system/usr/keylayout/Vendor_XXXX_Product_XXXX_Version_XXXX.kl
/system/usr/keylayout/Vendor_XXXX_Product_XXXX.kl
/system/usr/keylayout/DEVICE_NAME.kl
/data/system/devices/keylayout/Vendor_XXXX_Product_XXXX_Version_XXXX.kl
/data/system/devices/keylayout/Vendor_XXXX_Product_XXXX.kl
/data/system/devices/keylayout/DEVICE_NAME.kl
/system/usr/keylayout/Generic.kl
/data/system/devices/keylayout/Generic.kl
Click to expand...
Click to collapse
Another potentially useful resource is this list of keycodes:
http://source.android.com/tech/input/keyboard-devices.html
I haven't had time to play much with this stuff yet, but I DID try the KeynrTracker.apk listed here, however it does not seem to register any of the long presses, leaving us only with menubutton as 139 and back as 158. It could have something to do with the way this app is designed, or in the way Samsung is firing these button presses.
More to come.
Mix3d said:
Found this at the AOSP Site:
http://source.android.com/tech/input/key-layout-files.html
Another potentially useful resource is this list of keycodes:
http://source.android.com/tech/input/keyboard-devices.html
I haven't had time to play much with this stuff yet, but I DID try the KeynrTracker.apk listed here, however it does not seem to register any of the long presses, leaving us only with menubutton as 139 and back as 158. It could have something to do with the way this app is designed, or in the way Samsung is firing these button presses.
More to come.
Click to expand...
Click to collapse
I already explained how long presses work
Sent from my SGH-M919 using Tapatalk 2
elesbb said:
I already explained how long presses work
Sent from my SGH-M919 using Tapatalk 2
Click to expand...
Click to collapse
"Edit the smali code" doesn't really count... what file to decompile? Which lines?
I'm completely new to this level of android modifications
Can this be used to make "Menu" button work as recents and "Menu hold" as menu?
jastonas said:
Can this be used to make "Menu" button work as recents and "Menu hold" as menu?
Click to expand...
Click to collapse
I have changed menu to recents. Just edit the file in system/usr
I haven't changed 'menu hold' to menu yet, requires decompiling and I'm lazy.
3473 said:
I have changed menu to recents. Just edit the file in system/usr
I haven't changed 'menu hold' to menu yet, requires decompiling and I'm lazy.
Click to expand...
Click to collapse
Then how do you use the menu of so many apps that don't have the 3 dots?
3473 said:
I have changed menu to recents. Just edit the file in system/usr
I haven't changed 'menu hold' to menu yet, requires decompiling and I'm lazy.
Click to expand...
Click to collapse
decompiling WHICH file? throw me a bone, dude!
Mix3d said:
decompiling WHICH file? throw me a bone, dude!
Click to expand...
Click to collapse
That's what Google is for! We all started there!! I'll give you a hunt it lies within system/framework directory and starts with an a ^-^
Sent from my SGH-M919 using Tapatalk 2

[Q] Change Long Press Menu

WITHOUT THIRD PARTY LAUNCHERS, I would like to know how to change the behavior of "long pressing" Menu capacitive button? I would like to change this function to S-Voice.
I've tried changing JUST the long press behavior before to no avail. I was told I had to make a brand new systemui apk for that to happen.
You can however change the behavior of the whole button (changing what it does both short and long press) if you edit /system/usr/keylayout files generic.kl and gpio_keys.kl item 139 I believe. Make sure you change both files equally or your phone will soft brick. You can change it to be SEARCH instead of menu so short press would work as a search button and long press will ask you what voice search you want to use. Oh and you might need to tell apps to show the action overflow button (since you have no menu button) I don't know how to do that part
Why can't you use the double tap home button to accomplish this? Do you not like it? It's standard in s-voice settings
Sent from my SCH-I545 using xda app-developers app
I have tried generic.kl and gpio_keys.kl file changing but cant get it to work with s-voice. Also, I dont want the double press home button to control this because it does seem to make things slower when single clicking.
Sent from my Hyperdriven SCH-I545 using xda app-developers app

Categories

Resources