I can disable a keyboard or mouse using:
xinput disable <device>
But how could I know whether a device is previously disabled, in command line?
Unix & Linux Stack Exchange is a question and answer site for users of Linux, FreeBSD and other Un*x-like operating systems. It only takes a minute to sign up.
Sign up to join this communityThe man page says:
--disable device
Disable the device. This call is equivalent to
xinput --set-prop device "Device Enabled" 0
So you can use xinput --list-props
and grep
to find out if the device is enabled or not.