Press a Button and Use the Knob


I have a programmable mechanical keyboard with knobs.
Keyboard returns a hotkey, knob returns a hotkey (Shift+Command+F1 etc.)

I want to make an operation as:

Operation 01 :
Start: Press a button
action :Move mouse to a location
action :Hold left click

Operation 2 - Use the knob to drag the mouse to left or right (while left click is still down)
Operation end - Press a button (perhaps same button?)

The problem is when I use the knob it cancels the operation 01 so the left mouse button is not clicked down anymore. If I hold down left click on operation 2 it clicks every time I turn the knob, but it should drag.

Is this possible to achieve?

Hey @mr_crow,

Welcome to the forum!  :sunglasses:

Your question is a bit unclear.

  • What software?
  • What knob?

If you haven't read this it's worth a couple of minutes of your time.

Tip: How Do I Get The Best Answer in the Shortest Time?

Take Care,

(Keyboard Maestro Moderator)

I edited the post, I hope its more clear now.


I don't know as I have little experience with knob-based controllers...

Take a look here:

Midi Controller to Fader Dragging - Is This Possible? - #3 by JohnH

And search the forum for "knob".

I believe all the knob controllers are MIDI-based.

If this doesn't help report back.

Actually, this one just returns an hotkey. So, it's like pressing to a button that returns an hotkey.

In another words,

Press A , Start the operation
Get the current mouse location
Move the mouse to a coordinate
Hold down left key

Press B
Move the mouse to left by 30px (While left key is still down)
Press C
Move the mouse to left by 30px (While left key is still down)

Press A
Retrieve the mouse location
End the operation

You can do something like this:

Move Mouse- Press Mouse Button- and Drag v1.00.kmmacros (4.1 KB)
Keyboard Maestro Export

But that doesn't lock down the mouse button.

It might be possible to lock the mouse button down by calling a sub-macro asynchronously, but I wouldn't bet on it.

Let's see if Peter is up and around...


This wouldn't work.

Here is what I want to achieve (only wipe part.)

Operation :
Click A
1-Mouse goes to a location
2-Click left and hold

Click B - Move left continuously
Click C - Move right continuously

Click A again - Left click release, Mouse goes back to original location, operation ends.

1 Like