-
-
Save kosh04/650451 to your computer and use it in GitHub Desktop.
This file contains 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
#!/bin/sh | |
# http://gist.github.com/500229.txt | |
if [ "$TERM" = "linux" ]; then | |
# NOTE: dumpkeys & loadkeys command enable superuser only | |
dumpkeys | sed -e 's/keycode 58 = Caps_Lock/keycode 58 = Control/' | loadkeys | |
# echo 'keycode 58 = Control' | loadkeys | |
else | |
# Make CapsLock an additional Ctrl. | |
setxkbmap -option ctrl:nocaps | |
fi | |
# or | |
# xmodmap -e 'remove Lock = Caps_Lock' | |
# xmodmap -e 'add Control = Caps_Lock' | |
# xmodmap -e 'keysym Caps_Lock = Control_L' | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment