Last active
September 5, 2021 01:59
-
-
Save tomdaley92/7a97231fd70ef89eedd0879296b82a3d to your computer and use it in GitHub Desktop.
Debian Caps-lock Re-purposing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
hyper-caps() { | |
xmodmap ~/.Xmodmap -verbose | |
} | |
normal-caps() { | |
setxkbmap -layout us | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
keycode 66 = Mode_switch | |
keysym j = j J Left | |
keysym l = l L Right | |
keysym i = i I Up | |
keysym k = k K Down | |
keysym u = u U Home | |
keysym o = o O End |
For now, I'm not even bothering with any automation and just ended up creating some quick and dirty convenience functions in my ~/.bashrc
hyper-caps() {
xmodmap ~/.Xmodmap -verbose
}
normal-caps() {
setxkbmap -layout us
}
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Orignal solution of creating an entry in startup applications works on reboot but the key bindings reset when resuming from suspend (sleep states). I tried installing a script in
/lib/systemd/system-sleep/
which works sometimes but fails a lot and feels super race-condition-y. Looking intosetxkbmap
instead ofxmodmap
, as these two conflict and have the potential to reset each other.https://wiki.linuxquestions.org/wiki/Configuring_keyboards
https://utcc.utoronto.ca/~cks/space/blog/unix/XKeyboardRemappingNotes
Edit: I'm running Elementary OS 6 Odin