Best way to remap vim navigation keys to arrow keys

Despite all my efforts, I still really miss arrow keys for casual use - browsing a site, excel, highlighting text just takes so much more mental load for me. I keep trying different ways, but it’s a struggle for me!

I’m going to try something new - I’d like to map the vim navigation keys so that I don’t need the mod key if another modifier is pressed - for example

Ctrl - h = Ctrl - left arrow
Command - h = Command - left arrow
Shift + Command - h = Shift + command - left arrow
Mod + j = left arrow

So if I just want normal arrows, then I need the mod key, but for all other modifiers using the arrows (ctrl, cmd, alt, any of these with shift too), I want to map those to the arrow keys too…

I started doing this with various layers, but this won’t cover e.g cmd + shift, plus I can’t help but think there is an easier way to do this?



You could use macro commands, e.g.:

ifCtrl final holdKey leftArrow
ifGui final holdKey leftArrow
ifAlt final holdKey leftArrow
holdKey h

That’s so simple and obvious when i see it :smiley:

Thank you very much!!

:smiley: !

Matt and Karel – is that cool? Absolutely! Thanks a lot!

Still trying to find some time to go through Karels config – I am sure there are some pearls to discover.

EDIT: Unfortunately the idea has a major drawback. You will loose the h-key combinations (in the example), so when you need the shortcut Ctrl-h in a program it would act as an arrow instead. :frowning: So that is not a sensible option in the end (at least for my, when that would kill all shortcuts with g, t, r and n - in may layout those letters are in the right homerow at at Vim arrow locations).

I’m finding that it does have some limitations, but I think I can work around those, rather than give up on this - I do so much arrow key stuff that for me it’s worth sticking with

So far, the only major issue is that I"ve lost Cmd-L to get to the address bar in chrome. I’m just mulling over how best to remap this - Ctrl-L might work but you could end up with a mish-mash of shortcut workarounds.

Indeed. The other option is to remap the arrow keys you use. I have the arrows as a separate key – as the four bottom keys (in addition to the Vim locations), so I can still access all arrow-whatever-modifier-combinations and also have the arrows as such, with a single key press when that is handy (when not touch typing, for example while browsing that is handy).

I have mapped Ctlr-Right and Ctrl-Left to a key combo on my MOD-layer. I guess those are the ones you use as well (and optional with Shift in addition). I can reach those easily. The left space key is my mod key, and it is easy to press that together with LeftShift, and on the right side I have the Ctrl-arrow in good to reach places, so you press a combination of those keys:

A solution for not needing the mod key is to have the right case clicky button also as a mod, and you can have it so double-clicking it locks the mod layer. That way you only need your right hand and you can browse cells/webpages etc…?