diff options
author | Josh Rahm <rahm@google.com> | 2024-02-01 11:30:42 -0700 |
---|---|---|
committer | Josh Rahm <rahm@google.com> | 2024-02-01 11:30:42 -0700 |
commit | 2655a17230bca208c886fa51466d8557929e6c1a (patch) | |
tree | 676226070eb80f18d18fec997f83d98954c6d431 | |
parent | 9f793df0e00a76c46cdcaf3f0490bc11db684dce (diff) | |
download | rkb-2655a17230bca208c886fa51466d8557929e6c1a.tar.gz rkb-2655a17230bca208c886fa51466d8557929e6c1a.tar.bz2 rkb-2655a17230bca208c886fa51466d8557929e6c1a.zip |
Clean up some more bindings.
Have tab remap to hyper in the setxbmap script because it's pretty
useless unless xcape is running. I'd rather the default behavior be tab
acting like tab.
Add to the script the ability for caps lock to act as both escape and
control. I think I like it. It's still a test run.
-rw-r--r-- | jr | 19 | ||||
-rwxr-xr-x | setxkbmap.sh | 15 |
2 files changed, 23 insertions, 11 deletions
@@ -48,7 +48,7 @@ xkb_symbols "josh-dvorak-intl" { }; key <TAB> { type[Group1] = "TWO_LEVEL", - symbols[Group1] = [Hyper_L, ISO_Left_Tab] + symbols[Group1] = [Tab, ISO_Left_Tab] }; key <RCTL> { symbols[Group1] = [Hyper_L, Hyper_L] @@ -227,21 +227,20 @@ xkb_symbols "josh-dvorak-intl" { }; key <DOWN> { - symbols[Group1] = [Down, U2193, U21D3] + type[Group1] = "ONE_LEVEL", + symbols[Group1] = [Down] }; key <UP> { - symbols[Group1] = [Up, U2191, U21D1] + type[Group1] = "ONE_LEVEL", + symbols[Group1] = [Up] }; key <LEFT> { - symbols[Group1] = [Left, U2190, U21D0] + type[Group1] = "ONE_LEVEL", + symbols[Group1] = [Left] }; key <RGHT> { - symbols[Group1] = [Right, U2192, U21D2] - }; - - // A random key none of my keyboards have. Map it to tab so I can use xcape. - key <JPCM> { - symbols[Group1] = [Tab] + type[Group1] = "ONE_LEVEL", + symbols[Group1] = [Right] }; }; diff --git a/setxkbmap.sh b/setxkbmap.sh index 7595abf..306d20a 100755 --- a/setxkbmap.sh +++ b/setxkbmap.sh @@ -2,5 +2,18 @@ setxkbmap -layout jr -variant jdvprk -option numpad:mac killall xcape -xcape -e 'Hyper_L=Tab' -t 200 + +# Set tab to hyper, and set hyper to set mod3 +xmodmap <(echo ' + keycode 223 = Tab + keycode 23 = Hyper_L + remove mod4 = Hyper_L + add mod3 = Hyper_L + + keycode 222 = Escape + keycode 66 = Control_L + add Control = Control_L +') + +xcape -e 'Hyper_L=Tab;Control_L=Escape' -t 400 xset r rate 200 100 |