From dbd4bf4f11b56e174951f4f350cb104fab585cb5 Mon Sep 17 00:00:00 2001 From: Donovan Glover Date: Tue, 19 Dec 2017 23:29:34 -0500 Subject: [PATCH] Map Caps Lock to Ctrl and Esc with .xmodmap --- dotfiles/.xmodmap | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) create mode 100644 dotfiles/.xmodmap diff --git a/dotfiles/.xmodmap b/dotfiles/.xmodmap new file mode 100644 index 00000000..37340d8f --- /dev/null +++ b/dotfiles/.xmodmap @@ -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