You are not logged in.

#1 2013-12-26 21:12:23

Corubba
Member
From: Germany
Registered: 2010-11-14
Posts: 86

[SOLVED] Fn+Space not working inside X

Hello everybody.

My eternal fight against my X220 and its Fn+Space hotkey is going for the next round. It was working for a long time, but for a unknown time it stopped now. The other hotkeys are working almost out of the box, only this little one doesn't.

As far as I understand does the thinkpad_acpi (which I use) create a scancode from the acpi event triggered by the keypress, which is 0x13 according to the doc. This scancode is then mapped to a keycode by the keymap. In case of this key the keycode is 372 (zoom), which is above 255 and thus not usable by X. The last time I followed this wiki page to change the mapping to a keycode below 255. The SEARCH key has a keycode of 217 according to my `/usr/include/linux/input.h`.

$ cat /etc/udev/keymaps/module-lenovo
0x13 search

Then I could use `xev` to see the key event and .Xmodmap to assign a nice keysym and use it. But as far as I can tell this file is no longer used. So I found this thread and followed it to migrate my now unused keymap. I copied `/lib/udev/hwdb.d/60-keyboard.hwdb` to `/etc/udev/hwdb.d/90-custom-keyboard.hwdb`, deleted all I don't need (all except the lenovo part) and changed the line for Fn+Space like I did with the keymap file.

$ cat /etc/udev/hwdb.d/90-custom-keyboard.hwdb
keyboard:name:ThinkPad Extra Buttons:dmi:bvn*:bvr*:bd*:svnLENOVO*:pn*
 KEYBOARD_KEY_13=search

I checked the existence of the input device name and the correctness of the DMI with

$ xinput
⎣ Virtual core keyboard                   	id=3	 [master keyboard (2)]
    ↳ ThinkPad Extra Buttons              id=11 [slave  keyboard (3)]

$ find /sys -name modalias -print0 | xargs -0 cat | grep dmi
dmi:bvnLENOVO:bvr8DET56WW(1.26):bd12/01/2011:svnLENOVO:pn4290W1A:pvrThinkPad    X220:rvnLENOVO:rn4290W1A:rvrNotAvailable:cvnLENOVO:ct10:cvrNotAvailable:

Even after a reboot the key still produce a keycode of 372 (tested with `showkey -k`). `xev` and `showkey -s` give no reaction at all, the acpi event can be seen with `acpi_listen`. Using another key like "prog1" instead of "search" has the same result of somehow ignoring the new mapping and still use 372. It seems like the file is not used at all, or the rule does not match.


Any help or advise is appreciated.

Greetz Corubba

Last edited by Corubba (2013-12-29 17:04:53)

Offline

#2 2013-12-29 17:04:36

Corubba
Member
From: Germany
Registered: 2010-11-14
Posts: 86

Re: [SOLVED] Fn+Space not working inside X

It seems like the hwdb.bin is not rebuild on reboot (at least not on this pc), so I simply had to rebuild it using `udevadm hwdb --update` and everything works fine like intended.

*SOLVED*

Offline

Board footer

Powered by FluxBB