I’m trying to start a script when pressing a volume GPIO key. I’ve tried creating this udev rule with keycode 115 which does not work:
user1:~ # showkey -k
kb mode was ?UNKNOWN?
if you are trying this under X, it might not work
since the X server is also reading /dev/console ]
press any key (program terminates 10s after last keypress)...
keycode 115 press
keycode 115 release
evdev:name:gpio-keys:phys:gpio-keys/input0:ev:3:dmi:bvn*:bvr*:bd*:svnRuggedPC:pnRuggedPadC86V:*
KEYBOARD_KEY_115=f6
Button “F6” launches a script, set up in IceWM’s “keys” file. In the past, I’ve been able to hijack atkbd buttons using a hwdb rule just like this with no problem. I do not know much about hwdb or GPIO things in general.
user1:~ # udevadm info /dev/input/by-path/platform-gpio-keys.2.auto-event
P: /devices/platform/gpio-keys.2.auto/input/input5/event5
N: input/event5
S: input/by-path/platform-gpio-keys.2.auto-event
E: DEVLINKS=/dev/input/by-path/platform-gpio-keys.2.auto-event
E: DEVNAME=/dev/input/event5
E: DEVPATH=/devices/platform/gpio-keys.2.auto/input/input5/event5
E: ID_INPUT=1
E: ID_INPUT_KEY=1
E: ID_PATH=platform-gpio-keys.2.auto
E: ID_PATH_TAG=platform-gpio-keys_2_auto
E: MAJOR=13
E: MINOR=69
E: SUBSYSTEM=input
E: USEC_INITIALIZED=8388138
At one point, running this command showed an entry that said something like “KEYS=114-115” but they are no longer showing. I’m sure my poking around has made them go away.
Does anyone have a better idea of what I should do to take over one of these buttons? Thanks for any help/pointers. Please let me know if I need more information.