summaryrefslogtreecommitdiff
path: root/dotfiles/system/.profile.d
diff options
context:
space:
mode:
Diffstat (limited to 'dotfiles/system/.profile.d')
-rw-r--r--dotfiles/system/.profile.d/capslock.sh12
1 files changed, 12 insertions, 0 deletions
diff --git a/dotfiles/system/.profile.d/capslock.sh b/dotfiles/system/.profile.d/capslock.sh
new file mode 100644
index 0000000..1ca22f8
--- /dev/null
+++ b/dotfiles/system/.profile.d/capslock.sh
@@ -0,0 +1,12 @@
+#!/bin/sh
+
+# capslock.sh
+# Craig Jennings <c@cjennings.net>
+# long press capslock for control, short press for escape
+# requires xcape package
+
+# make CapsLock behave like Ctrl:
+setxkbmap -option ctrl:nocaps
+
+# make short-pressed Ctrl behave like Escape:
+xcape -e 'Control_L=Escape'