Need Macro To Display Context Menu and Select Menu Item

I'm using Nvivo. I wish to create a macro, that when text is highlighted, a command-/ keystroke sequence opens a context menu and takes me to a particular entry in the context menu.

Would appreciate any help or thoughts.



This will work for any app.

How To Use

  1. Change the menu item you want to select in the first Action:
    • image
  2. Select the Text
  3. Position mouse somewhere within the selection
  4. Trigger this macro (currently uses ⌘/ hotkey)

Example output


Below is just an example written in response to your request. You will need to use as an example and/or change to meet your workflow automation needs.

Please let us know if it meets your needs.


MACRO:   Display Context Menu (right-click menu) and Select Menu Item [Example]

-~~~ VER: 1.0    2020-11-01 ~~~
Requires: KM 8.2.4+   macOS 10.11 (El Capitan)+
(Macro was written & tested using KM 9.0+ on macOS 10.14.5 (Mojave))

DOWNLOAD Macro File:

Display Context Menu (right-click menu) and Select Menu Item [Example].kmmacros
Note: This Macro was uploaded in a DISABLED state. You must enable before it can be triggered.

Thanks so much.


Once again, many thanks. I am running V 9.0.6. and can't seem to locate "set Menuitem to Target.....'
Any suggestions on where I might find the action within the menu system. My search was unsuccessful.



This is actually the Set Variable to Text action, but I had renamed it to clarify its purpose. The key to determining the actual action is to look at the key words on the Action.
In this case, "Set Variable".


You can find it using the menu Edit > Insert Action > by Name...


which looks like this:

Just start typing any key words associated with the Action, like "set var"
Then choose from the list (press RETURN or double-click)

OR, if you prefer, you can display the Action Selection Panel (Actions > Show Actions):


Getting Started with Keyboard Maestro

For more help, see Getting Started with Keyboard Maestro and the Forum .

Also, you can download the macro I posted by clicking on the download link above:

Once downloaded, just double-click on the .kmmacros file to import into your local Keyboard
Then you can click on the Gear Menu of any Action to get Help for it:


Excellent. Done.

Thanks Again.


Thanx again. Truly appreciated.