Skip to content

Instantly share code, notes, and snippets.



Last active Sep 13, 2017
What would you like to do?
Xmodmap swap caps lock and ctrl

Create a file, like ~/.xmodmap and paste the following in it:

! Swap Caps_Lock and Control_L
remove Lock = Caps_Lock
remove Control = Control_L
keysym Control_L = Caps_Lock
keysym Caps_Lock = Control_L
add Lock = Caps_Lock
add Control = Control_L

xmodmap ~/.xmodmap

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment