thinkpad_acpi generated EV_KEY events are mssing scancodes
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
linux (Ubuntu) |
Fix Released
|
Undecided
|
Seth Forshee | ||
udev (Ubuntu) |
Fix Released
|
Medium
|
Martin Pitt |
Bug Description
Being the udev keymap maintainer, I get a lot of bug reports about wrong scancode -> keycode maps on a lot of laptops (see [1], [2] for details). For fixing these, the user needs to start the udev keymap tool in interactive mode, press the faulty keys, note the scan code, and tell me what the desired key code is.
In about 90% of the bug reports this works fine, but there are some cases where the evdev key events have null scan codes, such as on current ThinkPads:
$ /lib/udev/
AT keyboard: input/event3
module: input/event4
$ sudo ./keymap -i input/event4
Press ESC to finish
scan code: 0x00 key code: fn_f8
scan code: 0x00 key code: fn_f9
I. e. when pressing Fn+F8, I get the key code KEY_FN_F8 which is not particularly useful; I want something like KEY_VOLUMEDOWN. But as the scan code is zero, I have no way of fixing the faulty key.
I confirmed this on a few other thinkpads. Apparently the thinkpad_acpi driver doesn't copy the scan code of keys to the evdev struct, only the converted keycode.
The original ACPI events for the same keys (Fn+F8 and Fn+F9):
$ acpi_listen
ibm/hotkey HKEY 00000080 00001008
ibm/hotkey HKEY 00000080 00001009
[1] http://
[2] https:/
Changed in udev (Ubuntu): | |
assignee: | nobody → Martin Pitt (pitti) |
importance: | Undecided → Medium |
status: | New → In Progress |
Changed in linux (Ubuntu): | |
status: | Triaged → Fix Committed |
This is probably an one-line patch in thinkpad_acpi, and would allow me to provide much better hotkey support for ThinkPads, so I take the liberty to assign this to the kernel team (Andy confirmed that we really want to fix this keind of bugs).
Thanks!