aboutsummaryrefslogtreecommitdiff
path: root/.config/xkb/symbols
diff options
context:
space:
mode:
authorsrdusr <trevorgray@srdusr.com>2023-09-11 21:07:57 +0200
committersrdusr <trevorgray@srdusr.com>2023-09-11 21:07:57 +0200
commitd4d17d03b34e3bafa8e5011795ec5c55817924cc (patch)
tree55fab4765dbb2247b198f93951b620ed51dde41a /.config/xkb/symbols
parenta4791751ea6c150e66e35db5980e7cd14909e493 (diff)
downloaddotfiles-d4d17d03b34e3bafa8e5011795ec5c55817924cc.tar.gz
dotfiles-d4d17d03b34e3bafa8e5011795ec5c55817924cc.zip
Add setxkbmap
Diffstat (limited to '.config/xkb/symbols')
-rw-r--r--.config/xkb/symbols/vim_keys30
1 files changed, 30 insertions, 0 deletions
diff --git a/.config/xkb/symbols/vim_keys b/.config/xkb/symbols/vim_keys
new file mode 100644
index 0000000..f64c41f
--- /dev/null
+++ b/.config/xkb/symbols/vim_keys
@@ -0,0 +1,30 @@
+// ~/.config/xkb/symbols/vim_keys
+
+// Clear existing modifiers
+default partial modifier_keys
+xkb_symbols "basic" {
+ clear lock;
+ clear mod5;
+
+ // Define a custom modifier (Mode_switch)
+ modifier_map Mod5 { <MDSW> };
+
+ // Remap Caps Lock to AltGr (ISO_Level3_Shift)
+ key <CAPS> {
+ type[Group1] = "ONE_LEVEL",
+ symbols[Group1] = [ ISO_Level3_Shift ],
+ actions[Group1] = [ SetMods(modifiers=Mod5) ]
+ };
+
+ // Remap h, j, k, l to arrow keys when Mode_switch is active
+ key <AC06> { [ Left ] };
+ key <AC07> { [ Down ] };
+ key <AC08> { [ Up ] };
+ key <AC09> { [ Right ] };
+
+ // Make 'q' act as Escape when in Mode_switch
+ key <AD03> { [ q, Q, Escape ] };
+
+ // Shift+Caps to use normal Caps Lock
+ modifier_map Mod5 { Shift+CapsLock, <MDSW> };
+};