Fedora – Disable device with libinput

fedoralibinputyubikey

I want to disable a keyboard input device with libinput. Something analogous to:

xinput set-int-prop 1 "Device Enabled" 8 0

which follows the syntax:

–set-int-prop device property format value

Sets an integer property for the device. Appropriate values for format are 8, 16, or 32, depending on the property. Deprecated, use –set-prop instead.

(or like xinput set-prop).

I want to use this to disable a keyboard-emulating authentication dongle (Yubikey) from "typing out" out a token from a spurious touch.

Perhaps there is a preferred method not involving libinput to do this. I do not want to disable the dongle completely, as it has features other than generating a token through its keyboard emulation (it is a GPG smart card too).

I am using Fedora 26 with Wayland.

Best Answer

fwiw, the LIBINPUT_IGNORE_DEVICE udev property can be assigned to devices that should be ignored. Detailed docs are here:

https://wayland.freedesktop.org/libinput/doc/latest/device-configuration-via-udev.html#ignoring-devices

Related Question