I have a ThinkPad X41t running ArchLinux32. On the lid, it has several buttons. I gived them keycodes with
setkeycodes. Device can be "transformed" - i.e rotated by 180 degrees around hinge and closed like that. The problem is, when device is transformed, those lid buttons doesn't work - they still produce keycodes (as reported by
showkey), but they doesn't do anything. Using
evtest, I determined two things:
- Lid Buttons belong to same event device as regular keyboard buttons, to "AT Translated Set 2 keyboard".
Being 'transformed' it's an regognizable event. Here is report from evtest:
Event: time ..., type 5 (EV_SW), code 1 (SW_TABLET_MODE), value 1 Event: time ..., -------------- SYN_REPORT ------------ Event: time ..., type 5 (EV_SW), code 1 (SW_TABLET_MODE), value 0 Event: time ..., -------------- SYN_REPORT ------------
I also tried pressing keyboard keys when event of being transformed already happened using small stick, and they also weren't doing anything.
So I suspect that when event of being transformed triggeres something, that causes OS to ignore any key presses from this particular device. Is there a way to determine what and how does that, and how do I add Lid buttons to exception from this thing, so I could use them when device is transformed?
Thanks in advance.