libinput drops keys from infrared remotes after changing keymap

Sean Young sean at
Sun Sep 29 19:17:38 UTC 2019


When using IR receivers using libinput, key events get dropped if a new 
rc keymap is loaded and the key was not in the old keymap.

The input device keybit changes and libevdev does not notice this. Then
here we end up returning false:

The event is reported via evtest but not via libinput debug-events. 

So, for example, mceusb IR devices register with a keymap for MCE remotes.
If later a keymap for a different remote is loaded, e.g.:

$ ir-keytable -w /lib/udev/rc_keymaps/imon_rsc.toml 

If I press any button which does not exist in the MCE remote keymap 
(for example space or backspace), libinput does not report these events.

I've tried fixing this by making the kernel input device have all the keybit
fields set, but this had to be reverted since it overflowed the size of

If libinput receives an EV_KEY event which is unexpected, we could go
and check if the input device and see if keybit has added. 

However in a diferent sense ir-keytable changed the input device underneath
libinput; another way to fix this to add support for loading IR keymaps
to libinput and all the way up the stack. I've been wanting to do this
anyway but I have no idea if there is any interest in this.

Any thoughts on this would be appreciated!


More information about the wayland-devel mailing list