Click Hold Then Release on Next Action Doesn't Seem to Work

I have been utterly amazed at KM. I have never seen such an easy to use, but powerful macro builder.

This is why the click and hold features baffle me. In Macroworks, or ControllerMate, it's literally built into each trigger. "down" = hold "up" = release for a button or keystroke.

I want to:

  1. Move the mouse to a location.
  2. Click and hold on that location with the ability to move or alter the clicked object with a mouse.
  3. Move any usb mouse device (trackball, mouse, etc) to move the held object, or GUI element like a slider.
  4. Release that hold with the initiation of any KM defined "action". So not a generic keystroke, because I may need to use keystrokes while the object is still held in click. I want to build a macro with just the single action of "release click", that I can program at the head of every other macro, so that I can release the click by initiating another macro.
  5. Any other intelligent way of releasing the click. Keeping in mind, I don't won't hold down the macro button to keep the click held.

I have tried a lot of things, is there some secret in here?

Just straight click and hold fails:

It does produce this warning:

marco_release

So I try including click and hold in a "until" action. It kinda works at the desktop level, but if you move the mouse to far, like an inch, it lets go of the object. But in an application, it just freaks out:

https://drive.google.com/file/d/1PVQcbVTflAgLmXt6Rcly0E1W6c833xXH/view?usp=sharing

Users on the forum have mentioned tools like MouseTools. I tried that, and got the same results:

In addition, I don't understand something. If you look at the red box, it says the condition of my release macro is "true." I don't know why. I haven't pressed the macro key to trigger it:

I can do this in Controllermate, but it doesn't support Catalina, and I'm guessing will be unusable soon. I can also do this with Macroworks on PC. How else can I do this? Can I program this just within cliclick or mousetools maybe with a hotkey, and then use that hotkey inside of KM?

Thanks!

I think the reason that keyboard maestro is not really working in this kind of situation is because it is not enough “low level” in the catching of mouse events. So you often find that applications or system respond to mouse events before or at the same time as KM. I don’t know if it’s possible for Peter to fix this without doing some kind of hack of the system. But if it was possible to have better mouse/usb devices handling it could be great.

Now that controller mate is gone I switched to SteerMouse.

Hope it will solve your problem.

Thanks Joseki,

I installed SteerMouse, but I don't see how I can assign a left click and hold to keyboard shortcut or macro. It seems like I can assign macros to physical mice buttons, but not the other way around -- emulate a mouse click with a script or command line.

How would you build this:

/Applications/MouseTools -leftClickNoRelease

Thanks!

Hello,

I can click and hold, but new problem:

I done something like this for the macro:

Move mouse to the object you want to move, then trigger the macro, which will:

  1. Get the mouse position and save to a KM Variable (say "Local__ObjectLocation")
  2. Pause until a keystroke (I often use OPT-RETURN)
    • Now move your mouse to the destination, and press the keystroke
  3. Set "Local__Destination" to current mouse position
  4. Use a Move or Click Mouse action:
    • Starting Location, absolute position:
      • Local__ObjectLocation.X and Local__ObjectLocation.Y
    • Hold and Drag to absolution position:
      • Local__Destination.X, Local__Destination.Y

KM with automatically release the mouse button at end of macro.

Give that a try and let us know if it works for you.

Hi JMichaelTX,

Thanks for always chiming in, your advice is always helpful.

I think I'm having hard time explaining it. I don't have a pre-determined point to drag to. The application basically has a GUI trackball built in. Four trackballs actually, for color correction. Three trackballs are already pre-mapped to a Tangent Element Control surface. The fourth trackball is not.
You can however use a mouse to move the trackball, just as you would a physical trackball.

Here is the video:

https://drive.google.com/file/d/1baPuS6tNkQhuYBm-dY-GusS8erNS85lT/view?usp=sharing

My workaround has been to use Controllermate on Mac and Macroworks on PC, to click and hold that trackball, and move it around as if I were using a mouse. The key, is that Macroworks and Controllermate simply click and hold, until I release it with a command or action. When I re-engage the click and hold, it doesn't reset the control, as shown in the video I posted. It simply clicks were it is, and continues holding until I issue a command to release it.

Thanks!

I have watched your video several times, and I am still not clear on what it is exactly that you need to automate. Why not just use your mouse?

Perhaps you could create another video, with narration, that shows exactly what you want KM to do.

Hi JMichaelTX,

Grabbing a mouse or pen tablet slows you down dramatically while color grading in the complicated UI of DaVinci Resolve. You want to avoid using a mouse or pen tablet except when you need to, like roto or garbage masks, etc. It's just not delicate enough.

There are four GUI "trackballs" like the one in the video I posted within the DaVinci Resolve application. Each represents a specific tonal range of an image. Three of the application's GUI trackballs are mapped to three physical Tangent Element Panel trackballs. The only way to get the fourth trackball mapped to a physical trackball is to buy a $30k DaVinci Resolve panel. Which I would do, except that I've created an interface setup that is half the footprint with twice the functionality. If I can get one more piece of gear scripted, it might be three or four times the functionality.

The fourth trackball solution I use is Controllermate/Macroworks click and hold, on the fourth GUI trackball, with a Kensington trackball dedicated to that function, as well as a few others, like Curves manipulation. However, I'm not just turning on the GUI fourth trackball. There are between 5 to 10 macro actions (depending on the task) that happen first, with the GUI track link to Kensington as the last step.

For PC I'm fine for the future. Controllermate is dying, I need an alternative. I'm stuck in Mojave, leaving my with a dual boot setup so that I can work.

I'm also experimenting to try to get everything done through scripting, so I don't have depend on software that might go away,

However, Keyboard Maestro can do so much, I can see it in the tool kit for a long time to come.

Thanks!

OK, thanks for the clarification -- I take your point.
Unfortunately this is a very complex task, and since I don't have the DaVinci Resolve app, or anything similar, I can't even conceptualize a solution. Maybe others can be of more help.

Good luck.

Hi @JMichaelTX,

I appreciate all of your help and suggestions.

If any other folks struggle with this, or you want to look into it for any other reason, the important thing isn't the application. It's not so much what the function does in DaVinci Resolve, but what the "action" does when the macro is complete. You should be able to leave it in any state. So leave the mouse click down. Other apps just provide a warning, hey, your going to have a stuck key. Then it's up to the user to initiate another action to "unstick" the mouse click down.

I think there needs to be some code adjustment in KM. The "until" function should do it, so should the Cliclick or MouseTools script. Something in KM is interfering with that, or not running interference with the physical mouse, the way other apps do.

Thanks again!

Hi @JMichaelTX,

I was able to solve this with BetterTouchTools. I don’t fully understand what Peter said, but I think something about KM not operating at a low enough level for mouse click and hold to work. Even with an until action, keeping the macro engaged, something in KM just interrupts the mouse.

In BetterTouchTools I’m using image recognition, left click and hold, and a release button.

Here are the external controllers I’m using as a trigger to auto identify the GUI control point, jump to it, click and hold it, and manipulate it.

Tactile controls over Curves in Resolve is going to be a real time saver.

Just thought I’d post in case others were struggling with click and hold. This should work on any GUI control point. I’m just using image recognition because there is no accessibility framework access to this particular GUI control point.

Here is the programming.

Thanks again for all your help.

1 Like