Skip to content

Instantly share code, notes, and snippets.

@edwinclement08
Created January 26, 2022 10:39
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save edwinclement08/8a900c9d446de98e38cd3725cb0ac266 to your computer and use it in GitHub Desktop.
Save edwinclement08/8a900c9d446de98e38cd3725cb0ac266 to your computer and use it in GitHub Desktop.
How to Programmatically type Caps Locks to toggle it on linux
# To install on Arch-based distros(like Manjaro)
# sudo pacman -Syu xdotool
# To install on Ubuntu-based distros
# sudo apt-get install xdotool
xdotool key Caps_Lock
# Especially useful in VM scenarios where the parent OS has disabled Caps Lock,
# but somehow the child OS thinks that caps is active.
# Without a fix like this, the Caps state will never be in lockstep again
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment