Mobileread
Button Reassignment?
#11  isotherm 07-27-2010, 02:20 PM
Quote NiLuJe
NextPage:

echo "send 124" > /proc/keypad
Don't forget if you want to press a button from the direction pad, output to /proc/fiveway instead of /proc/keypad.

You can get the keycodes by running waitforkey with noparameters from shell. Once a key is pressed, it will output two numbers. The first is the key number (e.g. 124 for next page); the second is the key state (0 = released, 1 = pressed, 2 = held). If you want, you can run waitforkey with a key number as the parameter (e.g. waitforkey 124) and it will keep waiting until that specific key is pressed. This doesn't help with remapping, but one can add new keyboard shortcuts...
Reply 

#12  isotherm 07-27-2010, 02:33 PM
Sorry, edit time is already lapsed...

Actually, the original poster's question could be solved this way, since the SYM key doesn't do anything in plain reader mode. All you need is a script which executes the following in a continuous loop:
Code
waitforkey 94
echo "send 124" > /proc/keypad
The problem with this is that it always converts the SYM key into NEXT PAGE, even when you are trying to type symbols into the search field. A more elegant solution would need to provide a hotkey to enable/disable this feature on demand (or a way to detect what the current UI action is)...
Reply 

#13  drauger 05-04-2012, 02:19 AM
Could anybody advice a solution to bind custom script launch to key or key combination on K4? It wold be quite comfortable to rotate screen via long kepress or pressing 2 buttons simultaneously...
Reply 

#14  Rom1 06-07-2012, 02:03 AM
How could we get the touch screen "tap" information and send it as a next page ?
Reply 

#15  geekmaster 06-07-2012, 08:23 AM
Quote pgf
thanks. hadn't seen that log info yet.

fyi -- if you do "hexdump -C /dev/input/event0" while pressing keys, they keycode that you pass to "send DDD >/proc/keypad) appears in hex as byte 10 (counting from 0). NextPage is the 7c value in the following, where the first line is the press, and the second is the release:

(earlier bytes in the lines are timestamp and type information -- see linux/input.h)

in any case, i realized i don't need to inject those keytrokes, because one can grab a raw copy of the screen directly from /proc/eink_fb/virtual_fb.
You can also do "waitforkey". I do that in a "while" loop to get a bunch of keys. Simpler output.
Reply 

 « First  « Prev   (2/2)
Today's Posts | Search this Thread | Login | Register