profile: move swapping caps and escape to a script

This commit is contained in:
PowerUser64 2022-04-15 14:53:04 -07:00
parent 80e6430342
commit a0bececb43
2 changed files with 18 additions and 10 deletions

View file

@ -0,0 +1,14 @@
#!/bin/sh
# This will swap caps and escape. Will ask for root privilage.
# Requires: sudo
# Usage: swap-caps-escape
TMP_KEYMAP=/tmp/keymap_tmp.kmap
cat <<-EOF > "$TMP_KEYMAP"
keycode 1 = Caps_Lock
keycode 58 = Escape
EOF
sudo loadkeys "$TMP_KEYMAP"
rm "$TMP_KEYMAP"