As a Colemak user I was initially frustrated with the Transformer keyboard dock, as it comes with QWERTY and there is no obvious way to change the layout. After some googling and trial-and-error I was able to solve the problem. As it seems that there is no good guide on the transformer forum on how to change the keyboard layout, I figured that I might as well write my own, so that newcomers can accomplish the same thing more easily.
Disclaimer: The following are mostly the result of my own trial&error, so it might not be totally correct. Follow the guide at your own risk! Also this requires root access so be careful and back up anything that you might change.
The keyboard layout files for the ASUS transformer lie in these folders
Code:
/system/usr/keylayout
/system/usr/xt9/keylayout
The second folder is used when you are using one of the ASUS input methods (as suggested by ASUS to "keep consistency with the physical keyboard"), whereas the first folder contains keyboard layout for general situations. The file /system/usr/keylayout/asusec.kl is the main layout profile for the keyboard dock and it is in plain text format. Its original content looks like this
Code:
key 41 GRAVE WAKE UNLOCK
key 2 1 WAKE UNLOCK
key 3 2 WAKE UNLOCK
key 4 3 WAKE UNLOCK
key 5 4 WAKE UNLOCK
key 6 5 WAKE UNLOCK
key 7 6 WAKE UNLOCK
key 8 7 WAKE UNLOCK
key 9 8 WAKE UNLOCK
key 10 9 WAKE UNLOCK
key 11 0 WAKE UNLOCK
key 12 MINUS WAKE UNLOCK
key 13 EQUALS WAKE UNLOCK
key 14 DEL WAKE UNLOCK
key 15 TAB WAKE UNLOCK
key 16 Q WAKE UNLOCK
key 17 W WAKE UNLOCK
key 18 E WAKE UNLOCK
key 19 R WAKE UNLOCK
key 20 T WAKE UNLOCK
key 21 Y WAKE UNLOCK
key 22 U WAKE UNLOCK
key 23 I WAKE UNLOCK
key 24 O WAKE UNLOCK
key 25 P WAKE UNLOCK
key 26 LEFT_BRACKET WAKE UNLOCK
key 27 RIGHT_BRACKET WAKE UNLOCK
key 43 BACKSLASH WAKE UNLOCK
key 58 CAPS_LOCK WAKE UNLOCK
key 30 A WAKE UNLOCK
key 31 S WAKE UNLOCK
key 32 D WAKE UNLOCK
key 33 F WAKE UNLOCK
key 34 G WAKE UNLOCK
key 35 H WAKE UNLOCK
key 36 J WAKE UNLOCK
key 37 K WAKE UNLOCK
key 38 L WAKE UNLOCK
key 39 SEMICOLON WAKE UNLOCK
key 40 APOSTROPHE WAKE UNLOCK
key 28 ENTER WAKE UNLOCK
key 42 SHIFT_LEFT WAKE UNLOCK
key 44 Z WAKE UNLOCK
key 45 X WAKE UNLOCK
key 46 C WAKE UNLOCK
key 47 V WAKE UNLOCK
key 48 B WAKE UNLOCK
key 49 N WAKE UNLOCK
key 50 M WAKE UNLOCK
key 51 COMMA WAKE UNLOCK
key 52 PERIOD WAKE UNLOCK
key 53 SLASH WAKE UNLOCK
key 54 SHIFT_RIGHT WAKE UNLOCK
key 29 CTRL_LEFT WAKE UNLOCK
key 217 SEARCH WAKE UNLOCK
key 57 SPACE WAKE UNLOCK
key 100 ALT_RIGHT WAKE UNLOCK
key 97 CTRL_RIGHT WAKE UNLOCK
key 115 VOLUME_UP WAKE UNLOCK
key 142 SLEEP WAKE UNLOCK
key 105 DPAD_LEFT WAKE UNLOCK
key 103 DPAD_UP WAKE UNLOCK
key 108 DPAD_DOWN WAKE UNLOCK
key 106 DPAD_RIGHT WAKE UNLOCK
key 158 BACK WAKE UNLOCK
key 238 WIRELESS WAKE UNLOCK
key 237 BLUETOOTH WAKE UNLOCK
key 60 TOUCHPAD WAKE UNLOCK
key 224 BRIGHTNESS_DOWN WAKE UNLOCK
key 225 BRIGHTNESS_UP WAKE UNLOCK
key 61 BRIGHTNESS_AUTO WAKE UNLOCK
key 212 CAPTURE WAKE UNLOCK
key 150 EXPLORER WAKE UNLOCK
key 62 SETTINGS WAKE UNLOCK
key 165 MEDIA_PREVIOUS WAKE UNLOCK
key 164 MEDIA_PLAY_PAUSE WAKE UNLOCK
key 163 MEDIA_NEXT WAKE UNLOCK
key 114 VOLUME_DOWN WAKE UNLOCK
key 113 VOLUME_MUTE WAKE UNLOCK
key 172 HOME WAKE UNLOCK
key 139 MENU WAKE UNLOCK
key 104 PAGE_UP WAKE UNLOCK
key 109 PAGE_DOWN WAKE UNLOCK
key 107 MOVE_END WAKE UNLOCK
key 102 MOVE_HOME WAKE UNLOCK
key 86 EUROPE_2 WAKE UNLOCK
As it is just plain text, you can just open it with root explorer, navigate to the file, long press it and select "Open in text editor". Here is when root previlege comes in. You have to mount the filesystem as R/W (the button on the upper left corner in Root-Explorer) before modifying the content of this file, and this requires root.
Now it is straight forward. Just modify the file to reassign the keys. For example, change E to F in order to reassign the physical key "E" to mean "F" to the system. The complete keyboard layout for Colemak is as follows:
Code:
key 41 GRAVE WAKE UNLOCK
key 2 1 WAKE UNLOCK
key 3 2 WAKE UNLOCK
key 4 3 WAKE UNLOCK
key 5 4 WAKE UNLOCK
key 6 5 WAKE UNLOCK
key 7 6 WAKE UNLOCK
key 8 7 WAKE UNLOCK
key 9 8 WAKE UNLOCK
key 10 9 WAKE UNLOCK
key 11 0 WAKE UNLOCK
key 12 MINUS WAKE UNLOCK
key 13 EQUALS WAKE UNLOCK
key 14 DEL WAKE UNLOCK
key 15 TAB WAKE UNLOCK
key 16 Q WAKE UNLOCK
key 17 W WAKE UNLOCK
key 18 F WAKE UNLOCK
key 19 P WAKE UNLOCK
key 20 G WAKE UNLOCK
key 21 J WAKE UNLOCK
key 22 L WAKE UNLOCK
key 23 U WAKE UNLOCK
key 24 Y WAKE UNLOCK
key 25 SEMICOLON WAKE UNLOCK
key 26 LEFT_BRACKET WAKE UNLOCK
key 27 RIGHT_BRACKET WAKE UNLOCK
key 43 BACKSLASH WAKE UNLOCK
key 58 CAPS_LOCK WAKE UNLOCK
key 30 A WAKE UNLOCK
key 31 R WAKE UNLOCK
key 32 S WAKE UNLOCK
key 33 T WAKE UNLOCK
key 34 D WAKE UNLOCK
key 35 H WAKE UNLOCK
key 36 N WAKE UNLOCK
key 37 E WAKE UNLOCK
key 38 I WAKE UNLOCK
key 39 O WAKE UNLOCK
key 40 APOSTROPHE WAKE UNLOCK
key 28 ENTER WAKE UNLOCK
key 42 SHIFT_LEFT WAKE UNLOCK
key 44 Z WAKE UNLOCK
key 45 X WAKE UNLOCK
key 46 C WAKE UNLOCK
key 47 V WAKE UNLOCK
key 48 B WAKE UNLOCK
key 49 K WAKE UNLOCK
key 50 M WAKE UNLOCK
key 51 COMMA WAKE UNLOCK
key 52 PERIOD WAKE UNLOCK
key 53 SLASH WAKE UNLOCK
key 54 SHIFT_RIGHT WAKE UNLOCK
key 29 CTRL_LEFT WAKE UNLOCK
key 217 SEARCH WAKE UNLOCK
key 57 SPACE WAKE UNLOCK
key 100 ALT_RIGHT WAKE UNLOCK
key 97 CTRL_RIGHT WAKE UNLOCK
key 115 VOLUME_UP WAKE UNLOCK
key 142 SLEEP WAKE UNLOCK
key 105 DPAD_LEFT WAKE UNLOCK
key 103 DPAD_UP WAKE UNLOCK
key 108 DPAD_DOWN WAKE UNLOCK
key 106 DPAD_RIGHT WAKE UNLOCK
key 158 BACK WAKE UNLOCK
key 238 WIRELESS WAKE UNLOCK
key 237 BLUETOOTH WAKE UNLOCK
key 60 TOUCHPAD WAKE UNLOCK
key 224 BRIGHTNESS_DOWN WAKE UNLOCK
key 225 BRIGHTNESS_UP WAKE UNLOCK
key 61 BRIGHTNESS_AUTO WAKE UNLOCK
key 212 CAPTURE WAKE UNLOCK
key 150 EXPLORER WAKE UNLOCK
key 62 SETTINGS WAKE UNLOCK
key 165 MEDIA_PREVIOUS WAKE UNLOCK
key 164 MEDIA_PLAY_PAUSE WAKE UNLOCK
key 163 MEDIA_NEXT WAKE UNLOCK
key 114 VOLUME_DOWN WAKE UNLOCK
key 113 VOLUME_MUTE WAKE UNLOCK
key 172 HOME WAKE UNLOCK
key 139 MENU WAKE UNLOCK
key 104 PAGE_UP WAKE UNLOCK
key 109 PAGE_DOWN WAKE UNLOCK
key 107 MOVE_END WAKE UNLOCK
key 102 MOVE_HOME WAKE UNLOCK
key 86 EUROPE_2 WAKE UNLOCK
However I wasn't able to remap the Capslock button. It seems that it is hardware-mapped along with the LED. When you have done the modification, save the file and restart the tablet. Now you can enjoy the new keyboard layout, WHEN NOT USING THE ASUS INPUT METHODS.
So, in order to make the Asus input methods play nicely with you new layout, you also have to modify the .kl files in the /system/usr/xt9/keylayout directory. To most users the file of interest is qwerty-en_US.kl, but if you are like me and need to type in another language, remember to change the layout file of you language as well, e.g. qwerty-zh_TW.kl for Taiwanese people. The method is again the same as above. Note that this only reassigns keys on your physical keyboard, not those on the on-screen software keyboard.
About some terminal emulators
I use Better terminal emulator as my daily virtual terminal, and it has an annoying bug. If I start the app when using some input method other than the ASUS English keyboard, it doesn't change back for me, and sometimes there is no keyboard icon in the notification and even the key combination Ctrl+Shift doesn't work. If I just use Ctrl+Space then it will switch to an unknown input method and my modified keyboard layout is not detected. To fix this, simply switch to ASUS English keyboard before opening the terminal emulator (say, opening the google search and choose the input method).
About ESC and BACK
Now if you also use this tablet to SSH into your server to do some maintanence stuff, you will notice that there is one thing missing on the keyboard dock, which is the ESC key. In the place of the ESC, there is the BACK key which will take you out from the terminal you are using, which is quite frustrating especially if you use vi or vim on your server. To fix that, simply change the BACK key to ESCAPE in the asusec.kl file. Now if you still miss a back key which could come in handy when just using the tablet, I would suggest mapping the WIRELESS key to the right to BACK, as I can't really think of a situation where you really need to quickly toggle the Wifi on and off. Most (or all, since I didn't experiment with all the keys) of the shortcut keys can be thus shuffled around.
Remapping Function keys to F1~F12 (Partial Solution)
Sometimes it is desirable to have the usual function keys like F1~F12 handy. The above method can be applied to change the first row to these function keys. Say we can just change BLUETOOTH to F1 in the file asusec.kl. However at most times it is more useful to retain the original behavior of those keys, which is one of the reasons that the keyboard dock is so handy. I found a partial solution to the problem.
After changing, say BLUETOOTH to F1, in order to preserve the BLUETOOTH toggle functionality, we can modify the following file
Code:
/system/usr/keychars/asusec.kcm
Again it is a plain text file. The idea is to let the original BLUETOOTH key to act as F1, but Shift+F1 will let us toggle BLUETOOTH as we want. In order to accomplish this, add to the end of the file
Code:
key F1 {
shift: fallback BLUETOOTH
}
Ideally this will allow us to access the toggle functionality whenever we press Shift+F1. However this is labelled as a partial solution because this combo only works in an input field, like that of Google search. I'm still investigating how to make it work in general situations and will update any findings here.
OK, that's it. This is my first serious post after a year of silent surfing on the forum. Hopefully this will be useful to some people. If I posted on the wrong section or did anything inappropriate, please tell me immediately as I'm still relatively new to this forum.
Thanks!
For your first post it was a great one. Specifically remapping the Back key to escape is something I've wanted to do since the moment the dock arrived. Thanks again.
is there any way to map the F1-F12 keys onto the keyboard effectively replacing the Function keys(wireless, bluetooth, etc) as i really need it for work
What problem did you encounter remapping the caps-lock key? I remap caps-lock to left-control, and it works great. I also remap back to escape and left-control to back. I don't use caps-lock, so I do not have that mapped to any key at the moment.
I've been doing this for a while, and the most anoying thing is that it gets reset when a new ROM is installed. Keep a backup somewhere of the modified file so you don't have to re-edit it again...
Sent from my Transformer TF101 using Tapatalk
Thanks for this post. Very useful.
Is there a way to get a DELETE key rather than a BACKSPACE key? This would be most useful.
How about remapping the trackpad right click? Is that possible?
gwai_jai said:
is there any way to map the F1-F12 keys onto the keyboard effectively replacing the Function keys(wireless, bluetooth, etc) as i really need it for work
Click to expand...
Click to collapse
Remapping the function keys(wireless, etc.) is not a problem. You can just use the aforementioned method and change, say, BLUETOOTH to F1. However it is more desirable to retain the functionality of those keys as in the android environment. I've currently experimenting, and found a partial solution, which I included in the original post. Hope it helps you.
rilot said:
Thanks for this post. Very useful.
Is there a way to get a DELETE key rather than a BACKSPACE key? This would be most useful.
Click to expand...
Click to collapse
I believe in most situations Shift+Backspace will act as Delete.
It does in some things but doesn't in my terminal emulator. The soft keyboard Thumb Keyboard works fine though. Hmm.
rilot said:
It does in some things but doesn't in my terminal emulator. The soft keyboard Thumb Keyboard works fine though. Hmm.
Click to expand...
Click to collapse
Oh if you are using Bash in your terminal emulator then Ctrl+D will act as delete forward. No need for a dedicated delete key. Which terminal emulator are you using?
fizban007 said:
Remapping the function keys(wireless, etc.) is not a problem. You can just use the aforementioned method and change, say, BLUETOOTH to F1. However it is more desirable to retain the functionality of those keys as in the android environment. I've currently experimenting, and found a partial solution, which I included in the original post. Hope it helps you.
Click to expand...
Click to collapse
Thanks!! this is great!....but please tell us if you found a complete solution as well!
Im a UK user with the gb layout. I use thumb keyboard for onscreen as i find it easier to use. Problem is when you dock the keyboard you get a warning on screen and when you us ethe keyboard the " and @ are swapped around. Where can I change these? I can't seem to see them at all.
It woudl also be great if it was possible to disable teh keyboard compatibility warning.
Great find - I love XDA for these kind of tweaks (and full nlown ROMs of course.
I never used the search function, nut use the back function all the time so I swapped them. Now my "back" button is down where my hands ususally are and my search key is off in no man's land.
Gousee the only down sides is if any tricky hacker or legitimate key combos some along I'll have to push MY right ones not theirs.
'
Cheers to the OP for this coool, quick hack.
-JS
Aswome find. I was finally able to change annoying QWERTZ on czech keyboard to QWERTY Thanks!
Can I change the right touchpad button to right click, like on a computer?
I apologize if this has been addressed previously, is there an option to quickly access the task/program switcher from keyboard? I often use the TF in class and I can rely on the keyboard for most everything else but I have to use the screen for that function. Anyone find any workarounds with the keyboard?
Is there a way to remap the stock browser button to launch Opera (or any other browser) instead?
has anyone tried different layouts with different apps, I.E Email launch on one of the buttons as oppose to the stock programmed?
Then the second question I have is can you program the keyboard's shift functions? so change the @ on the 2 with ," ??
MasterfullDON said:
has anyone tried different layouts with different apps, I.E Email launch on one of the buttons as oppose to the stock programmed?
Then the second question I have is can you program the keyboard's shift functions? so change the @ on the 2 with ," ??
Click to expand...
Click to collapse
I already asked about changing places of @ and " but got no answers it would be really useful if i culd becaus ei use a different on screen keyboar and it messes up some of teh Shift + keys
Backwardsblade said:
I apologize if this has been addressed previously, is there an option to quickly access the task/program switcher from keyboard? I often use the TF in class and I can rely on the keyboard for most everything else but I have to use the screen for that function. Anyone find any workarounds with the keyboard?
Click to expand...
Click to collapse
I came to ask the exact same question. I find that the one function the dock keyboard is really missing for my needs. Yet it has a key for screenshot...
Is there a keyword for task switcher that we can use in this mapping file?
I rooted my Ziio" yesterday.
Installed Google apps.
Have some problems with SetupWizard.apk.
First time after restart work setupwizard i configured my google acc etc. , but after other restart hang on start screen where i must push the android in middle of screen to start, but after do it nothing happens. And homebutton not work , but after i deletet it with adb my Tablet work. Google MArket, Gmail. maps works.
MY Creative Ziio 10, heve 7 Hardware buttons under Display.
All of them work, only my Home button dnot work.
Normyly if i hold Home Button started Taskmanager, or if i press it i go back to desktop.
i have in /system/usr/keylayout/ 4 Files.
ACRPC.kl, qwerty.kl, Touchscreen,kl, wm8350_buttons.kl
But i dnot know where is for my home button.
Maybe blocking some App this button.
Other guy where rootes his ziio 10" , have same problem like me...
Any Ideeas ? how to fix it
I try to Edit Touchscreen.kl for Test.
I Set Homebutton @ 165
And Menu @ 163.
Menu works on new button but home still dnot work.
I think maybe google setup disabled the home funktion.
here a little cu on my touchscreen.kl
key 108 CALL WAKE_DROPPED
#key 103 CALL WAKE_DROPPED stargate rev0
key 139 MENU WAKE_DROPPED
key 103 ENDCALL WAKE_DROPPED
#key 108 ENDCALL WAKE_DROPPED stargate rev0
key 115 VOLUME_UP
key 114 VOLUME_DOWN
key 102 HOME WAKE
key 158 BACK WAKE_DROPPED
key 216 BACK WAKE_DROPPED
key 217 SEARCH WAKE_DROPPED
key 164 MEDIA_PLAY_PAUSE WAKE
key 201 MEDIA_PLAY_PAUSE WAKE
key 163 TOUCH_NEXT WAKE
key 165 TOUCH_PREVIOUS WAKE
key 212 CAMERA WAKE
key 116 POWER WAKE
Click to expand...
Click to collapse
Plz any one help me.
How did you obtain permanent root? I've gotten almost as far as you have but I've had to reset my tablet after the first or second reboot after rooting.
Thanks!
I dont know if it would be of help.... I have a Ziio 7
Rooted it - and the menu/homescreen would not work....tried lots of work around nothing happened (deleting the google accounts etc..etc..)
Finally i did a factory reset....
my google applications stayed (market, gmail etc...)
Rooted again.. and now everything works....
Ok I might sound like a noob here (which I am ) but I need to know the manufacturer of the screen and obtain drivers for it.
Why I need it?
We are trying to build a custom kernel and actually we got some success. But following are the bugs:
screen doesn't turn off after locking
camera doesn't work.. just a black screen
usb doen't work
touch sensitive buttons don't work except home button which now works as back button!
volume down button has now become volume up button.. and volume up button doesn't work...
What is the device name?
It is Karbonn A18/Neobox tuan 4.3 with MT6575 chipset and MT6620 combo chip.
--------
Can anyone please help? We are just two people working on this and looking for someone who can help us out.
Thanks in advance!
CHANGING HARD KEY FUNCTION (REMAPPING BUTTON)
Quote:
1. open /system/usr/keylayout/[phone model]-keypad.kl with notepad++
(Some phone may have different names, but it will always end with "keypad.kl)
it will look like this --
HERE YOU WILL FIND 3 ROWS...
Quote:
1. As you can see, there are different attributes assigned to each key. like this
Code:
key 102 HOME
key 139 MENU
key 158 BACK
key 115 VOLUME_UP
key 114 VOLUME_DOWN
2. Specific application/action launchers:
Code:
HOME #Launches "Home"
MENU #Launches "Menu"
BACK #Takes you back to the last activity
SEARCH #Launches "Universal Search"
CALL #Launches the "Phone" activity and corresponding .apk or initiates a call
ENDCALL #Ends a call
CAMERA #Launches "Camera" activity and corresponding .apk
FOCUS #Initiates Auto-Focus while using the Camera
VOLUME_UP #Self explanatory
VOLUME_DOWN #Self explanatory
3. And attributes saying if it should wake the phone at button push to complete the action, or if it should just complete the action without waking the screen.
Code:
WAKE #Completes the action without waking the screen
WAKE_DROPPED #Wakes the phone to complete the action
2. NOW WE WILL EDIT SECOND AND/OR THIRD ROW
Erase the center row value for any key to completely disable it. To reassign the key, replace the center row value with another one from the same row. Change the right row value to either "WAKE" or blank to enable the wake function. Do not modify the left row.
NOTE: don't edit left row i.e. first row which contains specific key identity number.
FOR EXAMPLE I DO THESE CHANGES
DEFAULT VALUES ---
Code:
key 115 VOLUME_UP WAKE
key 114 VOLUME_DOWN WAKE
CHANGED VALUES ---
Code:
key 115 CAMERA WAKE
key 114 FOCUS WAKE
NOW VOLUME UP KEY WILL WORK AS CAMERA KEY AND VOLUME DOWN KEY WILL WORK AS FOCUS KEY....
NOTE: all words should be in BOLD letters i.e. capital letters...
Hello,
My phone model is CCE SM70 in brazil, same as Karboon A18 and NEOBOX TUNA, i would like to know how you compiled the kernel for this device. You compiled the philips w732 from forum.china-iphone.ru with default kernel config for mt6575?
Thanks in advance,
Tiago
Hi all
I made some searches but didn't find any answer, hope some of you could help me.
I want to edit the system/usr/keylayout/device-keypad.kl to make my device go to sleep when screen on & longpress vol down.
Here is the original file content :
Code:
key 116 POWER WAKE_DROPPED
key 114 VOLUME_DOWN WAKE
key 115 VOLUME_UP WAKE
In fact, I don't know the keycode and keyevent name of a vol down longpress.
Can someone know this ? Or at least how to get it ? (Already tried KeyCode Display but it doesn't work as expected).
NB : I already tried Xposed Additions module, and it made the job quite well (device goes to sleep when longpress the right key), but all other keys seems to be messed up (double vibrate, sometimes some keys doesn't even work) so I decided not to use this module anymore and make it manually by editing the right file.
Thx for reading