Hold to Repeat - A few options


Updated and improved version HERE.

Old versions:

The idea here is for an action to repeat for as long as a key is held. These all achieve the same thing in slightly different ways.


6 - Hold to Repeat - Hotkeys.kmmacros (30 KB)


USB Device Keys v1:

6 - Hold to Repeat - USB Key v2 (Standalone).kmmacros (34 KB)


USB Device Keys v2:

If you don't like using Cancel all Macros (as in v1, above) and don't mind using two macros:

6 - Hold to Repeat - USB Key v1.kmmacros (33 KB)


This one starts triggering and stops when a variable changes.

6 - Hold to Repeat - USB Key v1 - Detect.kmmacros (29 KB)


This one changes the variable on key release.

Thank you noisneil!

6 - Hold to Repeat - Hotkeys.kmmacros

This macro is exactly what I need.

However, it is not easy to set the time. It would be extremely useful if the speed increased the longer a key is pressed and held. So at the beginning (for one second) 0.3, afterwards 0.1).

Do you think this is possible?

@Frankb How about this?

Repeat - Speed Up (Hotkey - USB Device Key).kmmacros (41 KB)

Macro screenshot

"How about this?"
Good question. Because my knowledge is not enough to understand what you did :rofl: :joy:

I need the (below) But at the beginning 0.3 for one second and then 0.1 (or less) if the key is still pressed and held.

How would that look like? Sorry, if I knew I wouldn't have to ask you :innocent:

Ok, so what you want is even simpler.

Repeat (Hotkey - USB Key) - Speed Up.kmmacros (47 KB)

Macro screenshot

The first 3 repeats are 0.3sec each; thereafter, each repeat is 0.05sec. This won't be exact, as there are calculations going on that add to the delay, but it's close enough to what you asked for.

Mh, "Delete" does not stop when "Delete" is up. I am obviously doing something wrong...

You need to set two triggers; one set to pressed and one set to released. Look at my macro screenshot.

Is this all just in aid of getting delete to repeat?

Why not just do this? How to enable key repeats on your Mac

Yes, thank you. I may be s.... but not up to this point. :rofl: I need key repetition to be off by default, with the exception of a few keys like Delete. These exceptions must be built with such macros.

No idea what that means but annnnyway... :joy:

Did it work for you or not?