Constant clicking macro

Hi everyone,

I want to set up a macro where I press a button on the keyboard and it constantly left clicks the trackpad until I let go out that button. However, I can only set the maximum to “triple click” within the software. I’m not a techie as you can see so any guidance on how to set that up would be helpful.

I hope there is a solution to this as it would save a ton of clicking saving me time and a possibly ruined trackpad. Please let me know.

Use the Repeat or While action, together with the click action and possibly a pause action.

  • While “key x is down”
    • Click
    • Pause 0.1

Thanks peter, I’m a complete newbie so how would I go and set this up?

Hey Sam,

Have a look at the wiki.

https://wiki.keyboardmaestro.com/Home_Page

See the Quick Start Page:

https://wiki.keyboardmaestro.com/Quick_Start

See also:

• Macros
• Macro Groups

Search for the Move or Click Mouse action.

Other documentation:

https://www.keyboardmaestro.com/documentation/7/keyboardmaestro.html
https://www.keyboardmaestro.com/documentation/7/keyboardmaestro.pdf

Spend a little time familiarizing yourself with the basics.

If you find yourself still scratching your head then holler.

-Chris

Thanks guys, I’ll report back to you.

The resources you suggested will be massively helpful.

(Resurrecting this thread because it keeps coming up at the top of my Google searches anyway)

So I've made a simple macro of the above:

It triggers fine, but if I hold down ⌘-2, the clicking will only repeat for 10 seconds. I have to release and re-press ⌘-2 to start the repeating clicks.

Any idea what's causing that timeout? If I hold down a key in Terminal, it'll repeat forever.

I'm guessing it's timing out because you're spawning hundreds of instances of that macro, which is not the most efficient way to go about it. Try placing those actions inside a While loop:

image

2 Likes

Thanks, I think you were spot-on there. The while loop works perfectly.

1 Like

Hot keys will only continue to repeat for a maximum of 10 seconds by default, basically as a safety mechanism in case they are somehow “stuck down”.

You can set the maximum key down trigger time for Hot Key triggers (default 10 seconds)

defaults write com.stairways.keyboardmaestro.engine MaxKeyRepeatTime -float 10.0