From 9c593f5e5579cce5bdfe3ee402ed2372e8303d99 Mon Sep 17 00:00:00 2001 From: druckdev Date: Tue, 16 Feb 2021 17:24:27 +0100 Subject: [PATCH] xmodmap: Change layout and disable xcape Change layout so that instead of rebinding caps_lock, escape and ctrl_r in a circle, the caps_lock key now just emulates escape. Caps_lock can now be accessed by pressing both Shifts together. Because of that xcape is disabled for now too. Not sure if I will keep it this way. Caps_lock is now triggered on every shift for a very small time too, that is why the caps_lock binding is removed from the i3 config. --- .config/X11/xmodmap | 17 +++++------------ .config/i3/config | 1 - .xinitrc | 2 +- 3 files changed, 6 insertions(+), 14 deletions(-) diff --git a/.config/X11/xmodmap b/.config/X11/xmodmap index a57deb1..b46ae0f 100644 --- a/.config/X11/xmodmap +++ b/.config/X11/xmodmap @@ -1,16 +1,9 @@ -! Bind Caps_Lock on Escape key, Ctrl_R on Caps_Lock key and Escape on Control_R -! The Caps_Lock key is also used for Escape through xcape -remove Control = Control_R +! Bind Caps_Lock to Escape remove Lock = Caps_Lock -keycode 9 = -keycode 9 = Caps_Lock - keycode 66 = -keycode 66 = Control_R +keycode 66 = Escape -keycode 105 = -keycode 105 = Escape - -add Control = Control_R -add Lock = Caps_Lock +! Bind both Shift keys together to Caps_Lock +keycode 50 = Shift_L Caps_Lock +keycode 62 = Shift_R Caps_Lock diff --git a/.config/i3/config b/.config/i3/config index 9877a96..9d190b9 100644 --- a/.config/i3/config +++ b/.config/i3/config @@ -153,7 +153,6 @@ mode "resize" { # back to normal: Enter or Escape bindsym Return mode "default" - bindsym Caps_Lock mode "default" bindsym Escape mode "default" bindsym $mod+r mode "default" } diff --git a/.xinitrc b/.xinitrc index 18e2d4f..6c64b73 100644 --- a/.xinitrc +++ b/.xinitrc @@ -30,7 +30,7 @@ fi unset {sys,user}{resources,modmap,xinitrcd} # acts as when pressed alone and shortly. -xcape -t 250 -e 'Control_R=Escape' +# xcape -t 250 -e 'Control_R=Escape' # Key repeat rate xset r rate 400 35