EssoAir
Well-Known Member
This is a tutorial on remapping the Android hardware keys
First, you will need to download Jota+(Text Editor) from the Play Store (the Android Market)
Now, download Root Browser (free or Pro will both work)
Now, open up the Root Browser and go to /system/usr/keylayout
Copy all the contents of that folder to /mnt/sdcard2/[WHATEVER YOU WANT TO CALL THIS FOLDER]
Now, copy the folder you just created above (containing the four files) and paste it back into the its self. Then rename this new sub folder "Backups" or "Originals"
Now, open Jota+, go to "menu" and click "file"
Click "Open..."
Navigate to the folder with the four .kl files and the Backups folder
Open gpio-keys.kl
change key 29 from "BUTTON_SELECT" to "BACK"
change key 56 from "BUTTON_START" to "MENU"
(you can make it whatever you want, really)
Here is a list of default key codes in Android http://code.google.com/p/androhid/wiki/Keycodes
save and exit.
Open Root Browser and copy gpio-keys.kl to /system/usr/keylayout and delete the old one
(delete the original before hitting "Paste)
Now, launch the "Kill Android" app, then relaunch android and confirm that the "Select" button now acts as the menu button and the "Start" button now acts as the back button.
Unfortunately, the coding for the nubs is incomplete and so I'm at a dead end here. Right_Nub_Down is mapped to Keycode 82 and Right_Nub_Left is mapped to keycode 4 but other than that, the nubs have no key functionality and so as far as I can tell, you can't change what they do. If anyone wants to look around and see if they can find a way, please post below!
Thanks,
CJ
Here is a helpful tool, btw: https://github.com/chrisboyle/keytest/KeyTest.apk/qr_code
(It tells you the keycode for the key you're currently pressing. The only thing it lacks is the ability to show the code for anything mapped to "HOME" simply because doing so quits the app before it gets the chance to record the data)
First, you will need to download Jota+(Text Editor) from the Play Store (the Android Market)
Now, download Root Browser (free or Pro will both work)
Now, open up the Root Browser and go to /system/usr/keylayout
Copy all the contents of that folder to /mnt/sdcard2/[WHATEVER YOU WANT TO CALL THIS FOLDER]
Now, copy the folder you just created above (containing the four files) and paste it back into the its self. Then rename this new sub folder "Backups" or "Originals"
Now, open Jota+, go to "menu" and click "file"
Click "Open..."
Navigate to the folder with the four .kl files and the Backups folder
Open gpio-keys.kl
change key 29 from "BUTTON_SELECT" to "BACK"
change key 56 from "BUTTON_START" to "MENU"
(you can make it whatever you want, really)
Here is a list of default key codes in Android http://code.google.com/p/androhid/wiki/Keycodes
save and exit.
Open Root Browser and copy gpio-keys.kl to /system/usr/keylayout and delete the old one
(delete the original before hitting "Paste)
Now, launch the "Kill Android" app, then relaunch android and confirm that the "Select" button now acts as the menu button and the "Start" button now acts as the back button.
Unfortunately, the coding for the nubs is incomplete and so I'm at a dead end here. Right_Nub_Down is mapped to Keycode 82 and Right_Nub_Left is mapped to keycode 4 but other than that, the nubs have no key functionality and so as far as I can tell, you can't change what they do. If anyone wants to look around and see if they can find a way, please post below!
Thanks,
CJ
Here is a helpful tool, btw: https://github.com/chrisboyle/keytest/KeyTest.apk/qr_code
(It tells you the keycode for the key you're currently pressing. The only thing it lacks is the ability to show the code for anything mapped to "HOME" simply because doing so quits the app before it gets the chance to record the data)
Last edited by a moderator: