Skip to content

Instantly share code, notes, and snippets.

Last active Jul 31, 2021
What would you like to do?
Install the "xdotool" utility as usual on Ubuntu, then go to "/lib/systemd/system-sleep"
directory and create a small shell script called "capslock" with the following content:
case "$1" in
/usr/bin/logger -t suspend -s 'Resetting CapsLock key'
/usr/bin/xdotool --clearmodifiers --delay 500 --repeat 2 Caps_Lock
Make sure to make it executable and should be owner by the root user.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment