Map Caps Lock to Ctrl and Esc with .xmodmap

This commit is contained in:
Donovan Glover 2017-12-19 23:29:34 -05:00
parent b8e41fbdbc
commit dbd4bf4f11
No known key found for this signature in database
GPG Key ID: 8FC5F7D90A5D8F4D

16
dotfiles/.xmodmap Normal file
View File

@ -0,0 +1,16 @@
! Make Caps Lock the escape key on press and the control key when used in combination with other keys
! Especially useful for vim and other programs so you don't have to reach for the escape key or the ctrl key
! This file makes the caps lock key function as ctrl and esc
! Note that you must run xcape -e 'Control_L=Escape' to add the escape functionality
! TODO: See if this can be expressed in the config file itself
! Clear both the caps lock and control keys
clear lock
clear control
! Set the caps lock key to Control_L
keycode 66 = Control_L
! Reassign the control command to the caps lock and control keys respectively
add control = Caps_Lock Control_L Control_R