From 0f1ea721b3654eff6970051878ca9bcd1c6e0613 Mon Sep 17 00:00:00 2001 From: srdusr Date: Sun, 23 Jun 2024 17:59:44 +0200 Subject: Add custom-us --- .config/xkb/symbols/custom-us | 27 +++++++++++++++++++++++++++ 1 file changed, 27 insertions(+) create mode 100644 .config/xkb/symbols/custom-us diff --git a/.config/xkb/symbols/custom-us b/.config/xkb/symbols/custom-us new file mode 100644 index 0000000..9faa2e9 --- /dev/null +++ b/.config/xkb/symbols/custom-us @@ -0,0 +1,27 @@ +// Clear existing modifiers +//default partial modifier_keys +partial alphanumeric_keys +xkb_symbols "basic" { + include "us(basic)" + + // Define a custom modifier (Mode_switch) + modifier_map Mod5 { }; + + // Remap Caps Lock to AltGr (ISO_Level3_Shift) and clear other modifiers + key { + 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 and clear other modifiers + key { [ h, H, Left ] }; + key { [ j, J, Down ] }; + key { [ k, K, Up ] }; + key { [ l, L, Right ] }; + + key { [ w, W, Up ] }; + key { [ a, A, Left ] }; + key { [ s, S, Down ] }; + key { [ d, D, Right ] }; +}; -- cgit v1.2.3