Macro for Mod-Tap vs. Double-Tap behavior (Mod + i = Up / Mod + ii = Up x5)

Hi everyone,

I’m trying to set up a specific macro behavior on my UHK 60, but I’m hitting a wall.

I’ve read through the documentation, but I’m struggling to figure out if the macro language supports conditional logic based on tap count while a modifier is held down.

Here is the specific behavior I am trying to achieve:

  1. Hold Mod + Press i once: Triggers Up Arrow (1 time).

  2. Hold Mod + Double-tap i quickly: Triggers Up Arrow (5 times).

Is this possible to script? If anyone has a snippet or can point me toward the specific function I should be using, I would really appreciate it.

Thanks in advance!

Hi there!

IMapping this on the i key in the mod layer should work:

ifDoubletap tapKeySeq up up up up
holdKey up

You may also want to set keystrokeDelay in typing behavior to some reasonable value, like 10ms, or for this usecase maybe 5.

4 Likes

Thank you!