Hotkey trigger tapped twice issue

Hello,

I set Keyboard maestro to launch an app by tapping twice a letter.
It's work but I can't use this letter to type anything with my computer.
I had to delete this Macro to be able to use my assigned letter key again.

I use macOs 12.4 & KM 10.1.1

Best,
CleanShot 2022-06-07 at 17.47.51

What works well is:

  • Trigger "is tapped" = letter remains letter.

  • Trigger "is long pressed" = launch an app.

Note: Depending on how fast you write, you may have problems with single letter triggers because they are typed when released.

Or have a look at the multipress solution.

1 Like

„If set like this the key letter doesn’t work“. Yes, correct.

1 Like

Thank you Frankb for your reply.

I tried "is tapped" and it worked but I lose my letter :smiling_face_with_tear:

I thought that with "is tapped twice"I could use the letter as it is and pressed twice rapidly to execute a Macro.
Am I wrong?

I read the link you attached but it's too advanced for me.

I tried to press twice the letter S slowly or fast but I could get the letter
work.

I know what you mean :slight_smile: If you want to keep it simple, do it as explained above. Do you understand the explanation?

  • Trigger "is tapped" = letter remains letter.
  • Trigger "is long pressed" = launch an app.

letter remains letter

I think I don't understand your explanation.

I set KM like you, and as I press S, Spotlight appears.

CleanShot 2022-06-07 at 18.25.50

You want to do this

"s" typed normally = "s".

"s" long pressed = launch app

Is this correct?

I would like to still be able to use normally the letter S
and find another way to use it to launch a Macro.
Pressed twice fast or long-press would be nice to launch a Macro.

Ok you have to set two macros.

this is how to just type "s".

And this is how to start an app. In this example KM. Press and hold "s" for a certain time, then release it.

This is not particularly elegant, but it works.

Thank you so much for your help.

I tried the "This hot key : S is long pressed"
and as other hot ket system the macro work but I lose the s
as a letter on my keyboard.

Or I miss something in your explanation or there is a bug.
I'll contact KM support.

CleanShot 2022-06-07 at 20.15.52

As @Frankb mentioned, here's how I do that sort of thing:

Tap = "S" - Long Press = App Launch.kmmacros (46 KB)

Macro screenshot

1 Like

No, you don't lose the "s" as a letter, if you set up this

But honestly, noisneil macro offers much more possibilities. It may seem a bit complicated at first, but it's not. Just try it.

I got you now.

I need to set 2 Macros.
1 for the S pressed once and
1 for the S long pressed :+1:

Sorry that it took so long :sweat_smile:

I'll try noisneil solution too.

Thank you both of you :heartpulse:

You are welcome :slight_smile:

Noisneil's multipress macro is excellent (not what he posted here, the other one)

Just type
image
then "l" twice. Or hold "l" and see what happens. To customize it, change the display action as you need it.

I don't understand how Noisneil work yet but it's very powerful!
I would prefer a system where I don't need to press multi modifiers
to execute it.
When I'll get more used to KM I might use Noisel's Multi press template.

The solution of

  • Trigger "is tapped" = letter remains letter.
  • Trigger "is long pressed" = launch an app.

works but I the letter S is showing more s lowly and I'm not sure
I will use thi s s olution :grin:

Ah, sorry, the multimodifier is just an example. You can use whatever you want. But if you want to use only one letter as a trigger, it is delayed with every solution. That's why I only use this with letters / numbers that are not needed when writing fast.

1 Like

Have you tried the one I posted above? Just change the app to be launched in the Long Press section and it should work right away for you.

How it works:

  • The token %Trigger% will either be "The Hot Key S is pressed" or "The Hot Key S is released".
  • Log Trigger State*: this tests the current state of %Trigger% and sets a variable, MPTriggerReleased, to either "YES" or "NO".
  • Detect Press Type: this If/Else group ensures further actions are only triggered once per press (not also triggered upon release).
  • Wait for Release: This is a Pause Until action that waits for MPTriggerReleased to be "YES", but times out in 0.2 sec. If it becomes "YES" in time, then we can consider this a short press; if the pause times out while it's still "NO" then we consider it a long press.
  • Check for Release: If the Pause Until action received the variable state it was waiting for ("YES"), then it succeeded, and the %ActionResult% is "OK". This is used to differentiate between short and long presses.
1 Like

Thank you Frankb,
Using the character / or [ for example would work great for me. :+1:

Woah noisneil, you are a fantastic user of KM :sunglasses:
I tried it even though I can't understand in detail how it works.
it' s still a little slow sometimes and I have no idea how to replace
the "Activate" Keyboard Maestro with my hot key :flushed:

How old is your mac?

I'm not sure what you mean. Do you want to change the hotkey or do you want to change which app is activated?