[systemd-devel] udev hwdb add unknown button
Floris
jkfloris at dds.nl
Fri Jun 9 08:23:46 UTC 2017
I have an older ASUS R2E UMPC[1], which has a couple of media buttons. One
button isn't recognized and print:
asus_laptop: Unknown key 9a pressed
I tried to add this button with an udev hwdb rule in
/etc/udev/hwdb.d/99-keyboard.hwdb
evdev:name:Asus Laptop extra buttons:dmi:bvn*:bvr*:bd*:svnASUS:pn*pvr*
KEYBOARD_KEY_95=keyboard <-- This one is added for testing purposes
KEYBOARD_KEY_9a=screen
after an udevadm update and trigger, udevadm info /dev/input/event5
reports the buttons:
...
E: ID_PATH_TAG=platform-asus_laptop
E: KEYBOARD_KEY_6b=f21 <-- This one is a default udev hwdb rule
E: KEYBOARD_KEY_95=keybaord
E: KEYBOARD_KEY_9a=screen
E: LIBINPUT_DEVICE_GROUP=19/0/0/0:asus_laptop
...
So far everything works as expected, but evtest doesn't show the remap of
the 9a key
...
type 4 (EV_MSC), code 4 (MSC_SCAN), value 95
type 1 (EV_KEY), code 374 (KEY_KEYBOARD), value 1 <-- This one is
modified as expected
...
type 4 (EV_MSC), code 4 (MSC_SCAN), value 9a
type 1 (EV_KEY), code 240 (KEY_UNKNOWN), value 1 <-- Why isn't this one
modified?
...
Only after adding {KE_KEY, 0x9a, { KEY_SCREEN } }, to asus-laptop.c line
355 [2] and rebuild the kernel module, I am able to remap and use the
media button on the laptop.
Is this a flaw in the kernel module or in udev?
Floris
[1] https://www.asus.com/Laptops/R2E/
[2]
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux-stable.git/tree/drivers/platform/x86/asus-laptop.c?h=v4.9.30
More information about the systemd-devel
mailing list