Last active
July 31, 2021 23:28
-
-
Save kwilczynski/2c98aad4e6205fea31fdb744889e4512 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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