Is there a way to all keys that are not mapped as the same mapping of the previous layer?

I am considering trying to move my homerow mods to a dedicated layer because I’ve yet to find a macro or timings that really work for shift on the homerow. I’ve seen Miryoku And homerow mods - #12 by maexxx but I don’t see a clear solution for homerow mod timing that works.

So now I’m wanting to create a new layer that has homerow mods but the rest of the keys are mapped exactly like base layer. Some other configurators like Via and Oryx allow you to map a key to “the previous layer” or the layer “below”. Is that possible in UHK?

Thanks!

Look for replaceLayer and overlayLayer in firmware/doc-dev/user-guide.md at master · UltimateHackingKeyboard/firmware · GitHub and firmware/doc-dev/reference-manual.md at master · UltimateHackingKeyboard/firmware · GitHub

They can be used to mimic that behavior, although admittedly it is a bit clumsy solution.

@Brandon After that tip of @kareltucek I just tried this out.

(1)

Create a layer that has ONLY the homerow-mod keys defined. You can even use a new keymap for that. I created a new keymap ‘HRM’ and used the fn and fn2 layers. On fn, I defined regular keys without secondary modifiers. On fn2, I defined the same keys with the secondary modifiers.

(2)

I then created two macros to turn HRM on and off.

hrm-on:

overlayLayer base HRM fn2
setLedTxt 0 '-+-'

hrm-off:

overlayLayer base HRM fn
setLedTxt 0 '---'

(3)

On my regular keymap ‘CMX’, I mapped two keys on the fn layer to call those macros.

fn+2 will now turn HRM on, and fn+3 will turn them off again.

The LED display will also show -+- when you turn them on and --- when you turn them off.

Is that what you were trying to achieve?

2 Likes

Thanks for all the suggestions in the replies. My only feedback is that this is quick clunk compared to competitor configurators.

Though the macro engine in UHK is pretty awesome for other unrelated features. For instance, oryx doesn’t support one shot mods + hold for whatever key on a single key yet this is a one line macro in Agent.