I've finaly got some routine on changing the keyboard layout on my Nexus 7 (and what i know the procedure is the same for all android devices) This is a notice for future use, and if somebody has the same issues.
1. Get files from the device
adb pull /system/usr/keychars/Generic.kcm Generic.kcmadb pull /system/usr/keylayout/Generic.kl Generic.kl
Rembemer to save backups!
2. Change the files
I found a reference to a file that got the swedish (and finish) letters of the alphabet. Especialy the parts in the kcm-file saying
key APOSTROPHE {
label, number: '\''
base: '\u00e4'
shift: '\u00c4'
ctrl, alt, meta: none
}
key SEMICOLON { label, number: ';' base: '\u00f6' shift: '\u00d6' ctrl, alt, meta: none}
and
key LEFT_BRACKET { label, number: '[' base: '\u00e5' shift: '\u00c5' ctrl, alt, meta: none}
And of course bocause i use dvorak, i also has the appropiate dvorak Generik.kl-file
key 1 ESCAPEkey 2 1key 3 2key 4 3key 5 4key 6 5key 7 6key 8 7key 9 8key 10 9key 11 0key 12 GRAVEkey 13 EQUALSkey 14 DELkey 15 TABkey 16 LEFT_BRACKETkey 17 APOSTROPHEkey 18 SEMICOLONkey 19 Pkey 20 Ykey 21 Fkey 22 Gkey 23 Ckey 24 Rkey 25 Lkey 26 COMMAkey 27 RIGHT_BRACKETkey 28 ENTERkey 29 CTRL_LEFTkey 30 Akey 31 Okey 32 Ekey 33 Ukey 34 Ikey 35 Dkey 36 Hkey 37 Tkey 38 Nkey 39 Skey 40 MINUSkey 41 APOSTROPHEkey 42 SHIFT_LEFTkey 43 BACKSLASHkey 44 PERIODkey 45 COMMAkey 46 Jkey 47 Kkey 48 Xkey 49 Bkey 50 Mkey 51 Wkey 52 Vkey 53 Z
Push files to the device
And when you are ready, use some useful tool to push the files back again (remount to make the system writable)
adb remount /system/usr/keychars
adb remount /system/usr/keylayout
adb push Generic.kcm /system/usr/keychars
adb push Generic.kl /system/usr/keylayout
4. Debug
Something can easily go wrong. If so make sure to change the logcat print. Write in terminalsu
logcat
In worst case.. Push the backup-files back again.
Prroblems that i had:
- I wrote the kcm-file wrong. You cannot make up new letters, that will cause a error.
- I got the wrong user access set on the files. I sudoed in the files so the system could not use the files. Fixed with chmod.
- I cannot write z... Not fixed. Don not know any workaroud...
Hope it helps! Post a comment if it doesnt.
Cheers!
Inga kommentarer:
Skicka en kommentar