Skip to content

Instantly share code, notes, and snippets.

@mkelzeer
Created May 29, 2021 00:31
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 mkelzeer/7619bbea322ae353125b45eaf3323180 to your computer and use it in GitHub Desktop.
Save mkelzeer/7619bbea322ae353125b45eaf3323180 to your computer and use it in GitHub Desktop.
A bash file that fixes Ubuntu caps-off delay causing "SOmething LIke THis"
#!/bin/sh
rpl='key <CAPS> \{ repeat=no, type\[group1\]=\"ALPHABETIC\", symbols\[group1\]=\[ Caps_Lock, Caps_Lock \],actions\[group1\]=\[LockMods\(modifiers=Lock\),Private\(type=3,data\[0\]=1,data\[1\]=3,data\[2\]=3\) \] \}'
# Create copy of kb description
xkbcomp -xkb $DISPLAY keyboardmap
# Replace CAPS
sed -i "s/key <CAPS>[^;]*/$rpl/" keyboardmap
# Apply
xkbcomp keyboardmap $DISPLAY
# Remove temp file
rm keyboardmap
# Source: https://github.com/hexvalid/Linux-CapsLock-Delay-Fixer/issues/12, https://github.com/hexvalid/Linux-CapsLock-Delay-Fixer/issues/12#issuecomment-845561764
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment