Skip to content

Instantly share code, notes, and snippets.

@kwilczynski
Last active Jul 31, 2021
Embed
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:
#!/bin/sh
case "$1" in
post)
/usr/bin/logger -t suspend -s 'Resetting CapsLock key'
/usr/bin/xdotool --clearmodifiers --delay 500 --repeat 2 Caps_Lock
;;
esac
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