Workaround for using the cursor keys on key-cluster to jump ahead/back (as secondary)?

Hello all — hope someone with more creative-thinking could make a suggestion?

I frequently use the left/right cursor keys on the key cluster to move forward/back in a sentence.
Ideally, however, I would like to also use them to jump ahead to end of words (OPT-left/right).
In other words, as their “secondary” use?

Am I correct in that there isn’t really a way to do this, other than to trigger a different layer?
I.e. there is no way to get the “secondary role” to be assigned as “opt-left” and “opt-right” on both keys?
From what I gather, the “secondary role” options are limited to what is available under that drop-down in Agent, correct?

Well. What does it mean w.r.t scancodes that you want to send and to keys that you want to press in order to send them?

If you just want to jump by words, then pressing ctrl with the arrows is the obvious answer.

As for secondary roles, they can also be triggered via macro command, which removes many limitations.

1 Like

Many thanks.

I realise I didn’t express myself to clearly — was wondering if there was a workaround to have the “secondary role” include more than the options presented by the drop-down list inside Agent (under “secondary role”)?
In other words, that holding down the “mod” key, would trigger “OPT+left” or “OPT-right”.

This just then to avoid reaching for “OPT” + left/right on key-cluster as I normally could, since it’s a little bit less convenient than triggering the extra with my right thumb (which is what I would prefer).

EDIT: Ah - ok. See your edit now about triggering a macro command. This could work — I hadn’t thought of that. Will have a look!

I would recommend to bind opt+left / opt+right into the media navigation mode and bind the media navigation mode to your mod layer.

Here is a relevant snippet example. You would put a similar snippet into a macro named $onInit:

set module.touchpad.navigationMode.base caret
set module.touchpad.navigationMode.mod media

set navigationModeAction.media.left keystroke LA-tab
set navigationModeAction.media.right keystroke LS-q

(Not sure which modifier OPT corresponds to - LA is left alt, LC would be left control, LG left super/gui/win key…)


As to the original meaning, you could bind a secondary role to a layers switch, but how do you recognize a secondary role from a layer switch then?

You would have to rely on a timeout or something. That is possible using the advanced secondary role configs, but probably not the most intuitive way to use the keyboard.

Anyways feel free to search for ifSecondary in firmware/doc-dev/user-guide.md at master · UltimateHackingKeyboard/firmware · GitHub and firmware/doc-dev/reference-manual.md at master · UltimateHackingKeyboard/firmware · GitHub

I understood that the OP wants to use the KEYS on the key cluster for left/right AND for something else, not the mouse navigation (touchpad, trackball, mini-trackball, touchpoint).

I think the easiest is to map these two keys differently on another layer such as Fn, and then press Fn+key to activate the second function. No need to use “Secondary” logic, as that’s for a different purpose.

3 Likes