Has Anyone Figured Out a Way to Replicate the Windows "Menu Key" on a Mac Using KM?

I just made the purchase and am no longer a "trial" user. It's odd...the menu appears like yours does in some situations, but like mine does in other situations. Hm.

In either case, I'm unfortunately still not having any luck getting KM to recognize this key.

I'm sorry I wasn't able to help with that. Like I said, very hard without having access to the actual keyboard you have.

I'm sure you won't regret investing in Keyboard Maestro. It is such a useful app. I would say it is one of the few third party apps I can't imagine using a Mac without now, along with 1Password and Dropbox.

And as it allows you to sync your Macros File using Dropbox it basically means you have your favourite shortcuts and macros on any Mac you use.

1 Like

Did you try karabiner-elements?
They have an Karabiner events viewer where you can check if this key is working

The key is named there application in section PC key/menu

1 Like

Thanks! I have not yet, but I plan to.

No worries, @Zabobon! You've been very helpful regardless.

And, yes, I'm only a couple weeks in and already loving KM.

I have a macro that just executes a right click, displaying the context menu accordingly, when I hit a hotkey. What am I missing?

The part about first moving the cursor to the item that is currently selected, e.g. in Finder, and only then bringing up the context menu.

Gotcha... I gave up on that project a good while back and satisfied myself with macros using the keyboard to quickly move cursor around the screen.

1 Like

Here's a real-case example of where this would be super useful:

In the Music app, when a song is selected there is sometimes a menu option to add that song to a certain playlist. But that option is frustratingly sometimes greyed out depending on what particular mode the app is in. In that case the only way to move the selected song to a certain playlist is to use the right-click menu. But unless the cursor/mouse pointer is hovering exactly over the selected track right-clicking won't bring up the context menu. Nor will any macro to simulate a right-click. This is why it would be so useful to be able to invoke the context menu for a selected item whether the mouse is over that item or not.

However, it looks like it is simply not possible on a Mac to do this (apart from by using @eurobubba AppleScript and that only works for the Finder).

1 Like

For whatever it's worth, it should be possible to write similar scripts using GUI scripting for other applications. I've never gotten around to trying this particular functionality with any others, though, and I won't have time to try any time soon. If you don't want to dig into it yourself, it might be worth trying the Script Debugger forum, where probably the savviest AppleScripters around these days hang out.

1 Like

@Zabobon @eurobubba I can only speak to my own experience and use cases, but to me, this is such useful and obvious functionality that it shouldn't require writing a script - or, even worse, having to write a script for each app where you want this functionality. If at all feasible, it should be built into KM.

I can't speak to the implementation, but as we've discussed, the actual concept is pretty simple: "Move cursor to center of selected item." (After which you can add a right-click action, or whatever other action appropriate.)

I have a friend who is an AppleScript Guru. I will give them this as a challenge. I know from experience it is hard to resist a challenge.

And I’ll also put a call-out on the Script Debugging Forum as you suggest.

1 Like

Very cool. Keep us posted!

Actually, maybe that is the key to the whole thing. Maybe someone on the Forum knows how to move the mouse cursor to a selected item? That would solve it.

Okay. With that simple concept by @alexcr I have a kind of solution.

It just uses the Keyboard Maestro "Click at Found Image" action. I took a screenshot of a selected area of the blue highlight colour that appears around selected items on a Mac. For some reason, each app needed a different screenshot of its own specific blue highlight colour which is why the Macro has different Switch/Case Actions - one for each App.

To add more Apps to the list you would duplicate the Switch/Case Action and then paste in a new selected area screenshot of that App's highlight colour into the Image Well in the Action.

And you would need to add in the App's name in the conditions.

This Macro might just work for you as is - or you might need to make your own screenshots of the Blue Highlight Colour for each specific App as they might be different on your Mac.

I've only tried it on one of my Macs so I don't know if it will work as expected on them all.

Click to Show Image of Macro

Call Context Menu For HIghlighted Item.kmmacros (63.5 KB)

3 Likes

I found someone created an Alfred workflow to do the right click. But I have not been able to do it on Catalina.
The code is three years old. So it may only work on older MacOS. Maybe someone familiar with coding can edit it to make it work for Catalina.

So far, the Keyboard Maestro macro I made has worked without problem on each of my Macs (two laptops and one desktop). So, it seems to be a workable solution.

@Zabobon, I'm looking forward to trying this out. I'm just having an issue right now that's preventing me from testing it...

Try this:

@Zabobon, just want to let you know that your solution is working for me. I've only set it up in Finder at this point, but as additional use cases arise, I'm going to try adding it in other apps.

It took me a little while to get it to work; for whatever reason, my KM needs a much wider rectangle of blue in order for it to be recognized. But once I figured that out, everything seemed to work just fine.

I appreciate your help. Keep me posted as you make new discoveries with this strategy. Hopefully at some point this functionality will be built into KM, as I think you and I agree that it would be super useful and would open up a whole bunch of new possibilities with KM. But in the meantime, I'm quite happy to have this solution.