How to convert a string into running a Keyboard shortcut?


I use a lot of applications (Word, Premiere Pro, Photoshop etc.) And as you know every one of these has its own shortcuts that I cannot remember. So I thought about a method to assign short (and easy-to-remember) keywords that when I type, the correspondent Keyboard Shortcut (I previously assigned) runs automatically.

A Quick (but not practical) example: I digit ":copy", and the computer executes ctrl+c (so I don't have to remember ctrl+c, but only the word :copy). (The same applies for more shortcuts of course).

Now the problem is..where do I digit the word :copy? If I am on a Word document it can work (the same as text expanders work by default). But I want it to work on any software (Photoshop for ex.). It means when I want to run a shortcut I don't remember, I'd like to open a keyboard maestro pop-up search bar window (with a simple Keyboard shortcut) where I digit and "search" for :cop... And it finds it (cause I assigned it before), I press Enter and it runs ctrl+c.

Can Keyboard Maestro do this? Does it have this "pop-up search bar" feature? If Yes, how?

Note: the :copy --> ctrl+c example may let you think it is unnecessary. But I actually would need it for more sophisticated shortcuts for many Applications. You can imagine how helpful it is!

Thank you!

Howdy, welcome to the forum! As you might have already figured out, this is a great community full of people who love to help.

Yes, Keyboard Maestro has a “pop-up search bar”, take a look at the Trigger Macro by Name action because it likely would work for what you need.

When you use it, a pop up menu appears that automatically populates a list as you type. It uses machine learning to learn what macros you most frequently trigger and move them to the top of the list. It is incredibly useful for those obscure macros whose trigger you can’t remember or that you don’t even have an assigned trigger.

Action Screen Recording (click to expand/collapse)

Screen Recording 2023-01-29 at 11.46.20


Thank you Chris for your welcome!
I am actually new to Keyboard Maestro!
so I can associate a trigger/action to execute a Keyboard Shortcut as I explained? I still don't understand if it is possible as a Macro on this amazing software!

In addition to what Chris said, for some uses you might like to check out the Typed String Trigger which works just like your text expander, as you describe.

@ahmedfarrag17 Are you sure it's easier to remember 100 keywords than 100 shortcuts? I am not quite convinced anymore.

Anyway, what you want to do, I was thinking about it recently too. It's a little crazy and I've never implemented it, but it works and it's safe. If you want have a look here :wink:

Hi Ahmed!

Assuming I am understanding you correctly, yes, you can assign a trigger and action to execute a keyboard shortcut. The example you used was to copy (⌘C by default for macOS), for which you would use the action: Type a Keystroke like in the screenshot below.

Action Screenshot (click to expand/collapse)

So for instance, if you were to create this macro...

Sample macro screenshot (click to expand/collapse)

Then besides being able to type :copy to trigger it, you could use the method I mentioned in my previous post to trigger it as you can see in the next screenshot...

Trigger macro by name macro screenshot (click to expand/collapse)


Incredible! This is extremely useful! Now finally I can get rid of the annoying Macro Keyboards I have to do this exact thing! :heart_eyes: Thank you so much!

1 Like

It is by far easier to remember keywords!
remembering the Keyboard Shortcuts for each software usually helps but sometimes (since I use a lot of apps) I get confused between shortcuts! and also I make mistakes (pressing a different combination of keys by mistake!). I initially wanted to solve this issue by buying Macro Keyboards! (so when i press on a key, it is programmed to run the shortcut I assigned to it). in the long term it is not practical, it is not portable + to be efficient I should have a keyboard of each software! ridiculous and expensive!

So I thought about assigning keywords! cause for sure I will remember the name of the action I want to do now, if it is copy, cut or more sophisticated ones (Lighten: Shift+Alt+G on Photoshop). I simply recall the search bar and search for ":lighten", press Enter and it is done! cause :lighten will be associated with Shift+Alt+G on Photoshop).
Super Intuitive and easy!

You offered a good solution for this! So thank you!

1 Like

Super useful! thank you so much for your suggestion

Ok, ok, you're convinced, that's good. Strings are cool. I'm not trying to convince you otherwise. :smiley:

Just this note. If an app has complicated shortcuts, you can change them as you like with KM, e. g. if you don't like ⌘⌥⇧G, you can change to ⌃G.

A nice feature of using Keyboard Maestro in this context is that it covers the situation where the actual menu item you would like to activate does not have a keyboard shortcut at all.

Sometimes applications allow you to custom assign a keyboard shortcut to a menu item that does not have one by default, but this can be a bother. And sometimes this ability is not provided at all. Whatever the case, you can simply use KM to fire off an Action to activate a menu item by its name. (See Action: Select or Show a Menu Item).

For example, if Photoshop has a menu item that Darkens a picture but that menu item does not have a keyboard shortcut, using the steps outlined above you could create :darken and that would directly fire off the menu item that darkens the picture without having to go through a keyboard shortcut that might not exist.