How Do I Use KM to Select Menu Items and Issue Keystrokes with Modifier Keys?

I'm looking for a way to have Keyboard Maestro execute simple menu commands (example: "open", save, copy, paste, etc.)

I'm also looking for a way for the program to execute keyboard shortcuts using modifier keys example: command-V, command A, etc.

Anyone knows how to do either of these?

First, add the Select or Show a Menu Item action to your macro and follow the steps as shown here:

This example is for the Open command in the Pages app (step 2) but you can do this for any app you want to control. You should be able to work out how to do this for any of the other commands...

The result of these 6 steps can be seen here:

KM 2 2020-11-13_10-44-04

which shows the action in the KM macro with the appropriate bits filled in.

Hope this helps.

2 Likes

Thank you so much for your reply! Really great help!

I just want to ask one more thing. How am I able to choose a word and turn it into a bold and italic format.

It would be more productive if you can describe what it is you actually want to achieve and with what apps.

For example: "I want to select a paragraph in MS Word and change the colour of the text to red.

By the way - I know that's not what you want to do (or is it :wink:) but it'll save a lot of questions in the long run if you can provide a good description!

1 Like

@theodemae it'll be easier to create a new thread, and add:

  • in which app you want to do that
2 Likes

Keep in mind that you never want to use Keyboard Maestro to execute an existing keyboard shortcut for a menu command in an app when you can instead use the Select or Show a Menu Item action.

Emulating keyboard shortcuts is relatively fragile and fairly easily interfered with.

I sometimes use them anyway for quick-and-dirty macros, but for anything I'll be using often and expect to be reliable I'll take the time to build a Select a Menu Item action.

-Chris

I hope you don't mind that I have revised your topic title to better reflect the question you have asked.

FROM:
Need Help with the Following Questions

TO:
How Do I Use KM to Select Menu Items and Issue Keystrokes with Modifier Keys?

This will greatly help you attract more experienced users to help solve your problem, and will help future readers find your question, and the solution.

Also, it is best to post each question in a separate topic.