summaryrefslogtreecommitdiff
path: root/scripts/keys
diff options
context:
space:
mode:
authorJacob McDonnell <jacob@jacobmcdonnell.com>2024-12-05 13:49:22 -0500
committerJacob McDonnell <jacob@jacobmcdonnell.com>2024-12-05 13:49:22 -0500
commitf8d09c5cfd6d1d9595b64547dc9d29c63e40c5f2 (patch)
tree0dd9cfa47cfa0bd4d57d7789439cc86afbbdfa85 /scripts/keys
parent29b1c791f6e319cdab828cee5f491ca1c38e41d1 (diff)
Moved .local/bin to scripts
Diffstat (limited to 'scripts/keys')
-rwxr-xr-xscripts/keys10
1 files changed, 10 insertions, 0 deletions
diff --git a/scripts/keys b/scripts/keys
new file mode 100755
index 0000000..c525982
--- /dev/null
+++ b/scripts/keys
@@ -0,0 +1,10 @@
+#!/bin/sh
+# This script is called on startup to remap keys.
+# Decrease key repeat delay to 300ms and increase key repeat rate to 50 per second.
+xset r rate 300 50
+# Map the caps lock key to super, and map the menu key to right super.
+setxkbmap -option caps:super,altwin:menu_win
+# When caps lock is pressed only once, treat it as escape.
+killall xcape 2>/dev/null ; xcape -e 'Super_L=Escape'
+# Turn off caps lock if on since there is no longer a key for it.
+xset -q | grep -q "Caps Lock:\s*on" && xdotool key Caps_Lock