B&N built the various Nooks on Android 2.1 (version 7)
At that time the keycodes only went to 91.
B&N snarfed the next 4 codes to use for the four page buttons on the Nook.
In later versions of Android, these 4 codes are PAGE_UP, PAGE_DOWN, PICTSYMBOLS, SWITCH_CHARSET.
You can both generate and use these keycodes yourself with the sense of later versions of Android.
If you remap the four hardware keys, it's pretty typical to use them for back, menu, forward page and backward page.
If you assign the paging buttons correctly you will be able to use them for other apps and also use a USB keyboard to page the native Reader too.
The two hard keys to assign are LEFT_NEXTPAGE for PAGE_UP and LEFT_PREVPAGE for PAGE_DOWN.
Those two buttons could be physically anywhere. I have them upper left and upper right.
On the Reader Settings select the silly diagram on the right.
Now, whichever key you have assigned to PAGE_DOWN will go to the next page in Reader.
It's all a bit confusing.
Here's my /system/usr/keylayout/TWL4030_Keypad.kl
Code:
# Layout file for Nook Touch hardware buttons
key 412 LEFT_NEXTPAGE # Upper left
key 407 LEFT_PREVPAGE # Upper right
key 139 BACK # Lower left
key 158 MENU # Lower right
Easiest way to change the key-mapping for the up-down keys is xorzone's NookTouchTools app http://forum.xda-developers.com/showthread.php?t=1289894
Related
Inspired by the thread about changing the Pocket IE (or T-mobile) button, is it possible to remap that button to CTRL+C and the FN+PocketIE button to CTRL+V? Do these keyboard shortcuts even exist in CE.NET 5/WM5? At the very least I need them for remote desktop so if anyone knows how one might acheive this, I'd love them in a manly way
how hard is it to 'hack' WM5?
there would seem to be enough "spare" buttons on the Exec that one could be used as Ctrl...
the blue Fn button, doesn't have any key-combination bindings with X, C or V - so cut, copy and paste (keyboard shortcuts I miss the most, too!) could be done with Fn-X, Fn-C etc.
does anyone know how easy it would be to do this?
I agree that the missing [Ctrl]-key is a right pain. Sadly, I can't offer a solution, but experimenting with key combinations has shown up some oddities!
Holding [shift]+[Fn] followed by a key on the bottom row first puts a character into the current application before actioning the special function of that key.
For example, open Word, then press:
[shift]+[Fn]+[envelope] inserts character: "z"
[shift]+[Fn]+[windows] inserts character: "x"
[shift]+[Fn]+[PIE] inserts character: "c"
[shift]+[Fn]+[space] inserts character: "v"
[shift]+[Fn]+[symbol] inserts character: "b"
[shift]+[Fn]+[left arrow] inserts character: "n"
[shift]+[Fn]+[down arrow] inserts character: "?"
[shift]+[Fn]+[right arrow] doesn't do anything
Pressing:
[shift]+[Fn]+[c] unfortunately launches [PIE]
However, pressing:
[shift]+[Fn]+[v] first inserts the character "v", but then opens the (tap-&-hold) shortcut menu with "Paste" highlighted. If you have some text in the clipboard then it will automatically paste that text into the application. Just a pain that it inserts the "v" first.
Above all based on the O2 XDA Exec.
I've tried to get [ctrl] working with Aekmap but had no luck.
It's a shame because it's not just copy and paste that needs a ctrl key. I use pocket PuTTY a lot to administer *nix machines and [ctrl]+c is kind of vital.
You just hold Fn and press Space to get the edit menu.
That's why the symbol on it is the same as the seldom-used edit key to the right of the Alt-Gr on a regular PC keyboard.
Or am I missing the point here?
I think you are missing it a little. I (and I'm sure others) use terminal services client quite a bit and not having a CTRL key is a real pain. In some circumstances, your suggestion works, but not universally.
Has anyone had similar issue?
When I open Start Menu, some letters of Program names are underlined.
Any idea how to remove those marks?
Thanks in advance!
These are keyboard shortcuts to those programs (similar in "desktop" windows - when you press "Alt" key you have some letters underlined; when you press those letters on the keyboard it shall activate the given option).
There is a registry key under HKEY_LOCAL_MACHINE (which unfortunately I can not remember right now)
with a value called something like HardwareKeybaordEnabled (sorry I can't be more specific).
If you change it from 1 to 0 the lines will go away.
"HKEY_CURRENT_USER\SOFTWARE\Microsoft\Shell\HasKeyboard 1",change 1 to 0 and power off...
Hi everybody,
I am trying to play version of Doom ported for PocketPC on my Prophet (here: kokak.free.fr/DoomPPCB04b.zip). It runs fine for the most part, the problem is some important keys are missing. The program comes with a configuration file (doom.cfg) that has a series of lines referring to mappings of action -> keycode. Example:
key_fire 134
key_use 194
key_strafe 184
key_speed 182
key_alwaysrun 20
key_escape 195
Some of the default key mappings work with the keys on the prophet keypad or with actions on the touchscreen, specifically (the game runs with the screen horizontal, so this is coherent):
up key -> strafe right
down key -> strafe left
left key -> move forward
right key -> move backward
central button -> fire
moving stylus left or right over touchscreen -> turn left/right
(probably cycling weapons would work with some other key but not sure of that yet)
So, basically i'm missing the escape (for going back to menu, quitting, saving and loading), tab key (for map) and space (open doors) for Doom to be functional. It can probably be accomplished if the mappings from actions to keycodes in the doom.cfg were configured appropiately. Problem is I have no idea what the keycodes for the HTC prophet keypad keys are, or a way to find them out (something like a program). I've googled this extensively but couldn't find anything.
Does anyone know keycodes for the two action buttons on top of keypad (the left and right "hyphens" so to speak), the "home" and "ok" keys (bottom left and right) and the send and end keys (green and red buttons), or any way to find them out?
Thanks!
Don't see much movement around here Either nobody knows or nobody is interested...
Anyway, I found out what I was looking for incidentally. It turns out another program (the MAMEC3 emulator por Pocket PC, the multi arcade machine emulator) has an option for reconfiguring the keys associated with actions of the emulator, and you can see there the keycode in hexadecimal of any of the keys of the phone after you press it.
I'll copy the keycodes for the HTC Prophet in case anyone else had the same problem. These are in HEX, the doom.cfg uses the same keycodes in decimal:
Camera Button -> 0xC3
Volume Up (the sliding button on the left) -> 0x75
Volume Down (the sliding button on the left) -> 0x76
Comm. Manager Button -> 0xC4
Left "Function Button" (top left above keypad) -> 0x70
Right "Function Button" (top right above keypad) -> 0x71
Send ("green") Button -> 0x72
End ("red") Button -> 0x73
Home Button (the one with the windows logo) -> 0xC1
OK Button (the one with "ok" inside a circle) -> 0xC2
Fire/Action Button (the one in the centre of keypad) -> 0x86
Up (on keypad) -> 0x26
Down (on keypad) -> 0x28
Left (on keypad) -> 0x25
Right (on keypad) -> 0x27
I don't know if the "Off" (putting phone to sleep) Button has a keycode, but the MAME emulator couldn't capture that one in any case.
Awesome, thanks for the MAMEC3 tip. I'm trying to find out the key codes for my Rhodium Touch Pro 2 so I can remap worms world party keys. I also installed RhodiumKbdControl_GSM_1.4 in a quest to find the keys.
Keep it up!
Hello!
I am owner SE Xperia X2 (R3AA035)
I managed to customise all keys necessary for me by editing of file
SonyEricsson_Xperia.Keyboard.Qwerty.English.kmap.txt
except arrow keys (up, down, right, left).
To me-would be desirable, that the given keys functioned
without preliminary double click of a key [o] (change to input digits and characters)
Prompt - probably-whether it to make by editing of file
SonyEricsson_Xperia.Keyboard.Qwerty.English.kmap.txt
And if it is possible - that that it is necessary to register in it for this purpose.
Thanks.
Hi folks,
I'm trying to remap the hardware buttons of my rooted Xperia Pro with stock ICS 4.0.4, but there are some quirks that trouble me.
Basically, I want to
1.) remap the language button on the QWERTZ hardware keyboard.
2.) Prevent the camera button from unlocking the phone - just press power to show the lock screen, then hold camera button, the press home key and you'll see how easy it is for the phone to unlock in your pocket.
So far, I parsed through the keyboard layout files in /system/usr
I remapped key 368 in pm8058-keypad.kl to CTRL_LEFT, which did not seem to make any difference! Language button still invokes language dialog
I also modified quertz.xml and qwerty-en.xml by replacing META_LANGUAGE with META_CTRL_LEFT - did not make any difference.
Of course, I rebooted the phone inbetween...
Regarding 2), I have no clue. Butting WAKE_DROPPED behind CAMERA and FOCUS in pm8058-keypad.kl does not help.
I could use some help with key remapping as well. If I find some info i'll send it your way.
No progress for me so far... anyone?
kyanox said:
I could use some help with key remapping as well. If I find some info i'll send it your way.
Click to expand...
Click to collapse
I want to re-map the 0 (Zero) key and the OK button orientation on the PIN Lock feature. Any info what files I need to change?
I GOT IT!!! partially at least....
Reading through http://source.android.com/tech/input/key-character-map-files.html and http://source.android.com/tech/input/key-layout-files.html once again, I finally found something that pointed me into the right direction!
I order to make my change to the Language button work (remapping key 368 to CTRL_LEFT), there are two possible ways:
1.) Set hardware keyboard to FULL keyboard type by replacing "type ALPHA" with "type FULL" in /system/usr/keychars/pm8058-keypad.kcm
This will make the hardware keyboard work without any additional GUI, so pressing shift will allow you to select text and copy&paste via ctrl+a,c,v,x now works (This still depends on the app you are using. Some do ignore this, some will still work with menu+a,c,v,x instead)
But beware:, in order to enter numbers or upper case letters, you now have to keep the modifier key pressed.
Printable characters can be edited via /system/usr/keychars/pm8058-keypad.kcm, non-printables like modifier keys can be edited via /system/usr/keylayout/pm8058-keypad.kl
Android keycode names can be found here: http://source.android.com/tech/input/keyboard-devices.html
Until now, I was unable to create a solution for entering special characters like ä,ö,ü
I tried to via sym or meta keyword in .kcm file while mapping the Sym key to SYMBOL or META_LEFT via the .kl file, but it didn't work...
2.) The .xml files in /system/usr/keyboard-config/layouts are used only with the keyboard configured as "type ALPHA". In order to identify the correct .xml file, you have to parse through the files in /system/usr/keyboard-config/languages and look for the script keyword, which in conjunction with the declarations in /system/usr/keyboard-config/keyprint.xml will tell you to the layout xml file for your device localisation.
Now, in order to remap printable characters, you have to edit the correct layout xml file and for non-printable characters, you have to edit the scancodes.xml file in /system/usr/keyboard-config.
Unfortunately, shift-selecting text will not work with "type ALPHA" mode and it seems that editing scancodes.xml is not sufficient to remap language button to CTRL_LEFT, but the .kl file has to be changed, too.