(Q) mapping hardware keyboard, polish layout

6 posts
Thanks Meter: 0
By 09mysh, Junior Member on 27th April 2014, 08:11 PM
Post Reply Subscribe to Thread Email Thread
Hello everyone

I am trying to acheive the right method for mapping hardware keyboard. Usb host works perfectly, always does what it should on firmware 1.21 with nook manager, kernel version 176. I found some polish keychar kcm file on the net, then I renamed that file with right vendor and product id for my keyboard (terminal, keyboard connected in host mode, typed: lsusb) and placed it in system/usr/keychars... But that didn't make any effect on keyboard mapping, looks like that file is ignored. I could try to edit qwerty.kl in system/usr/keylayouts but from what I know, you cant add there symbols like "ą" or "ś". What I am going for is just these few polish letters : Ą,Ę,Ś,,Ż,Ź. Normally you get them by pressing modifier (alt) and for example, " A", what gives you "Ą" etc. Usb mode ultilty, and little app avaible on net - Key Test, both will show you the same keycode when you pressing a letter or letter+modifier. That makes hard to find out how to edit keylayout file (qwerty.kl) as you cant guess that needed keycode. I was looking quite a lot for answers on xda before I decided to ask, but what I finds does'nt look like exact sollutions. Hopefully I didn't miss anything. Adb is working fine for me, any hints appreciated, Thanks
Last edited by 09mysh; 27th April 2014 at 10:44 PM. Reason: missed content
28th April 2014, 05:05 AM |#2  
Renate NST's Avatar
Recognized Contributor / Recognized Developer
Thanks Meter: 939
Step one, determine what .kl and kcm.bin the Nook is trying to load.
You will see this if you have ADB and logcat running when you connect.
It will try to load one based on the VID/PID.
It will tell you the exact name of the file.
Probably your naming is different.
I ran into this already.
I didn't bother, I just use qwerty.kl and qwerty.kcm.bin
These are the defaults when there is no VID/PID specific files.

If your kcm.bin is correct it should have the UTF-16 values inside.
The format is pretty simple. After the header (32 bytes) it's like:
   uint32 keycode;
   uint16 label;
   uint16 keypad;
   uint16 normal;
   uint16 shifted;
   uint16 alt;
   uint16 altshifted;
You can just enter the little-endian UTF-16 values using a hex editor.
The Following User Says Thank You to Renate NST For This Useful Post: [ View ]
29th April 2014, 02:23 AM |#3  
OP Junior Member
Thanks Meter: 0
Ok I got it! It is easy to find some proper tutorials for hex editing qwerty.kcm. But before I did that effort and started learning about it, I searched for some very lazy sollution: qwerty.kcm.bin already prepared by someone else. I found one (obviosly with polish layout),I swapped the original file with it, set the permissions to be the same as in original file, reboot (don't know if absolutely necessary)... thats it, easy. All that thanks to some hard working man who (as he has mentioned on other forum) spent the whole night learning on how to edit qwerty.kcm in hex editor.
Anyway, thank you very much for directing me in the right way. Knowing which files should be edited helped me to resolve the problem. Also logcat is very interesting tool, as it might give some image of how the system works. Thanks
Last edited by 09mysh; 29th April 2014 at 02:33 AM.
Post Reply Subscribe to Thread

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

Advanced Search
Display Modes