Double Tap documentation

Do we have documentation for double-tap? I’m having trouble getting it to work.

I would think “double tapping” a key means pressing it twice in quick succession.

A key is “tapped” if it is pressed and release quickly. “tapped twice” means tapping a key twice in quick succession.

Keep in mind that Keyboard Maestro cannot see the future, so “tapped once” will fire even if you tap the key twice (“tapped” would fire both times).

So say you tapped a key three times, the following triggers would fire:

  • pressed
  • released, tapped, tapped once
  • pressed
  • released, tapped, tapped twice
  • pressed
  • released, tapped, tapped thrice
1 Like

Can you give me an example how using the tapped (once, twice, three, ect) hot key trigger would be useful? Because when I try to set up two different actions, for example one action for tapping it once that pastes 123. Then a second action for tapping it twice that pastes abc. However, when I tap twice it ends up executing both actions pasting 123abc. What I want it to do is only paste abc when I use the hot key trigger tapping it twice selected.

However, when I tap twice it ends up executing both actions pasting 123abc.

Of course, because you first tapped once, and then tapped a second time.

As mentioned, Keyboard Maestro cannot see the future. So the only way you can have something happen when you tap once but not happen when you tap twice is for it not to happen until some time after the first tap, long enough to determine that the second tap has not happened. This delay is generally not desirable, and so Keyboard Maestro does not currently support this.

If you want to do it yourself, you could do something like this:

Macro abc
Trigger: Key tapped twice
Set variable "abc Macro Executed" to calculation NOW()
Paste "abc"

Macro 123
Trigger: Key tapped once
Pause 0.5 second (as short as possible, but long enough that two taps wont be counted - the exact time is dependent on your keyboard settings)
if calculation NOW()-abc Macro Executed < 0.5 then
    Paste "123"

Just want to say again how great this has been, thanks very much! This allowed me to combine several complex scripts into one easy step.

@ppayne I think you're referring to this, right?