Skip to content

Instantly share code, notes, and snippets.

@tkanarsky
Created May 6, 2021 18:21
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save tkanarsky/c909c3d763442e81f400779a5a704618 to your computer and use it in GitHub Desktop.
Save tkanarsky/c909c3d763442e81f400779a5a704618 to your computer and use it in GitHub Desktop.
Keyboard cleaning script -- disables keyboard for some number of seconds
#!/bin/bash
xinput --list
echo "Enter keyboard id:"
read kb
echo "Enter time to disable keyboard (sec):"
read sec
xinput set-prop $kb "Device Enabled" 0;
for i in $(seq $sec -1 1); do
sleep 1;
echo $i;
done
xinput set-prop $kb "Device Enabled" 1;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment