diff options
Diffstat (limited to 'ar')
| -rwxr-xr-x | ar/.local/bin/remaps | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/ar/.local/bin/remaps b/ar/.local/bin/remaps index 15433d5..d9aaa5f 100755 --- a/ar/.local/bin/remaps +++ b/ar/.local/bin/remaps @@ -4,6 +4,11 @@ xset s off -dpms # Decrease key repeat delay to 200ms and increase key repeat rate to 50 per second. xset r rate 200 50 +# Turn off caps lock if it is on. Reset the keymap options first so the +# Caps_Lock keysym still toggles the lock; after the remaps below the caps +# key acts as Ctrl and pressing it can no longer turn the lock off. +setxkbmap -option +xset -q | grep -qE "Caps Lock:[[:space:]]+on" && xdotool key Caps_Lock # Map the caps lock key to control, and map the menu key to right super. xinput list | grep 'id=' | while read -r line; do keyboard=$(echo "$line" | grep -i 'id.*keyboard' | sed 's/.*id=\([0-9]\+\).*/\1/') @@ -55,6 +60,4 @@ xinput list | grep 'id=' | while read -r line; do done # When left control, caps lock, or Super_L is pressed only once, treat it as escape. killall xcape 2>/dev/null -# Turn off caps lock if on since there is no longer a key for it. -xset -q | grep -qE "Caps Lock:[[:space:]]+on" && xdotool key Caps_Lock xcape -e 'Caps_Lock=Escape;Control_L=Escape' #;Super_L=Escape' |
