Secondary role - non modifiers / Superkeys

I’ve been playing with smart macros to replicate superkeys, which are:

  • Tap
  • Hold
  • Tap and hold
  • Double-tap
  • Double-tap and hold

According to @kareltucek, hold cannot be detected, which leaves us with tap and double-tap. However, I also wanted to implement triple-tap.

When mapped to the C key, the following macro outputs 1, 2, and 3 upon tap, double-tap, and triple-tap, respectively:

ifGesture 89 89 final tapKey 3
ifGesture 89 final tapKey 2
tapKey 1

The above macro doesn’t output intermediate characters; triple-tapping C only outputs 3, but the following macro outputs 1, 2, and 3.

tapKey 1
ifGesture 89 tapKey 2
ifGesture 89 final tapKey 3

The first example is typing-friendly because it doesn’t output intermediate characters. The second example can be useful in games. For example, in first-person shooters, one can map the weapon numbers of the right half to left half numbers via double-taps.

Although superkeys currently can’t be fully implemented on the UHK, smart macros open up much more possibilities. One could specify per-gesture timeouts and tweak behavior as highlighted by the above examples.

2 Likes