[Gta04-owner] X keycode of the Power button
Neil Jerram
neil at ossau.homelinux.net
Mon Nov 7 14:59:22 CET 2011
Hello all...
I'm playing with UIs on my GTA04, and having trouble binding an action
to the Power button. The problem seems to be a misunderstanding
somewhere about what the right keycode is for the Power button.
When I run xev and press the Power button, xev says that the keycode is
124, and the keysym is XF86PowerOff. But if I bind XF86PowerOff to an
action in matchbox-window-manager's config, and run
matchbox-window-manager with debugging enabled, its output indicates
that it has mapped XF86PowerOff to keycode 222. Therefore matchbox
grabs keycode 222, and the result is that nothing happens when I press
the button, presumably because the keycode is really 124.
(Also "xmodmap -pk" agrees that the keycode is 124.)
Looking at the source code, matchbox just uses XKeysymToKeycode to do
the mapping. So apparently XKeysymToKeycode(XF86PowerOff) == 222.
I'm not sure where to look next for this problem, so can anyone help?
What determines what the keycode is? - is it evdev config? Searching
has turned up hints that it might be invalid to use XKeysymToKeycode is
XKB is in use; but I'm not sure whether XKB is in use on the GTA04 (or
what that means).
I should add that this is all after I've added the following lines to
my xorg.conf:
Section "InputDevice"
Identifier "Power Button"
Driver "evdev"
Option "Device" "/dev/input/event2"
EndSection
Section "InputDevice"
Identifier "AUX Button"
Driver "evdev"
Option "Device" "/dev/input/event0"
EndSection
+ adding two InputDevice lines in Section "ServerLayout". Is that an
OK thing to do? Is it OK to mix tslib for the touchscreen with evdev
for Power and AUX buttons?
Finally, another problem is that even after the additions above,
pressing the AUX button doesn't cause any xev output at all. Do I need
to do something else to get it plumbed through to X? Note that I do see
stuff if I do "cat /dev/input/event0" and then press AUX, so physically
and electronically the button is working.
Many thanks for any assistance!
Neil
_______________________________________________
Smartphones-userland mailing list
Smartphones-userland at linuxtogo.org
http://lists.linuxtogo.org/cgi-bin/mailman/listinfo/smartphones-userland
More information about the Gta04-owner
mailing list