Skip to content

Instantly share code, notes, and snippets.

@chis
chis / disable keyboard
Created August 22, 2021 09:10
Gets a list of input devices and uses awk to grab the laptop keyboard, for me at least - sometimes this number changes, so the correct number is grepped, then xinput float disables the keyboard input. Useful if you have cats that sit on your laptop.
xinput list|grep -i "translated"|awk '{print $7 }' | xinput float $(grep -oE '[0-9]+' $7)