I'm trying to also have access to my arrow keys from the default Vim hjkl.
Since CtrlShiftAlt seems to be a rare key combo, I was thinking about using that.
How would I do that using setxkbmap (or another equivalent tool)?
using a similar setup with caps+hjkl via xkb. i'm sure you can adapt it easily. caps is set as level5 modifier.
1. put xkb_symbols "vim" in ~/.config/xkb/symbols/vim-keys
default partial alphanumeric_keys modifier_keys xkb_symbols "vim" { name[Group1]= "L5: vim arrow keys"; key <AC06> { type = "EIGHT_LEVEL", symbols[Group1] = [ h, H, ugrave, Ugrave, Left, Left, Left, Left ] }; key <AC07> { type = "EIGHT_LEVEL", symbols[Group1] = [ j, J, uacute, Uacute, Down, Down, Down, Down ] }; key <AC08> { type = "EIGHT_LEVEL", symbols[Group1] = [ k, K, U0133, U0132, Up, Up, Up, Up ] }; key <AC09> { type = "EIGHT_LEVEL", symbols[Group1] = [ l, L, oslash, Oslash, Right, Right, Right, Right ] }; include "level5(caps_switch)" }; 2. add level5 group rules/evdev.xml
copy /usr/share/X11/xkb/rules/evdev.xml to ~/.config/xkb/rules/evdev.xml and add
<group allowMultipleSelection="true"> <configItem> <name>L5</name> <description>Level5 keys</description> </configItem> <option> <configItem> <name>l5:vim</name> <description>vim: hjkl arrows</description> </configItem> </option> </group> 3. map rules to symbols in rules/evdev
copy /usr/share/X11/xkb/rules/evdev to ~/.config/xkb/rules/evdev and add
l5:vim = +l5(vim)` 4. activate
e.g. in gnome-settings or via
$ setxkbmap us -option l5:vim now you can press caps+hjkl for arrow keys, works nicely on my laptops without a proper qmk keyboard.
note: quickly copy pasted this from my own setup, renamed a bit, hope i didnt miss anything and it helps you!