Keyboard Maestro 8 0 3 – Hot Key Tasking Solution

Posted on  by

The Hot Key trigger is perhaps the most common and most basic of all triggers. When you press the configured keyboard key, the system swallows the keystroke, and Keyboard Maestro executes the macro.

The key can be a letter, number, symbol or function key, often in combination with one or more modifiers (Shift, Control, Option and/or Command). Almost any key can be a trigger, and keep in mind the number pad counts as different keys to the numeric keys on the main keyboard.
You can type the desired key or key combination in the hot key box, or select a predefined key (holding down any desired modifiers) from the popup menu to its right. Note that there is a relatively prevalent third party / system bug that makes the system think it is permanently in a password field, and this will prevent entering a hot key by typing in this manner.

The keystroke may include zero or more of the normal modifiers (Command, Option, Shift, Control), together with another key (such as a letter, number, function key or other keys). The Fn key is not a modifier and cannot be used as such. It retains its normal purpose in toggling the function keys role, and so it might be part of a hot key, but only if the function keys normally have their hardware (eg brightness up) role and then Fn key makes them into a function key suitable for use in a hot key trigger.

You can configure the hot key trigger to execute the macro when the key is pressed, when it is released, or repeatedly while the key is held down. This allows you to do things like have a macro execute when the key is pressed, and then a second macro execute when the key is released, for example to toggle a setting on and then off again.

  1. Home Forums General Technology Computer Zone PC Apllications Keyboard Maestro 9.0.4 – Hot key tasking solution Welcome to Ramleague, Ramleague - the best site for pinoy chat, games chat and mobiles chat.
  2. Keyboard Maestro Reviews 9.0.6. Hot-key tasking solution. Follow this app Developer website. The support i received from Peter was first class. I had a thorough explanation of a problem i posed in a very friendly manner. Peter's explanation was very easy for me to follow.
  3. I am running Keyboard Maestro 8.0.3, Excel 15.39 (171010) Office 365 Subscription (I believe they the most current versions of each). Thanks for any help, here. Your tips on this and other pages are great!

You can configure the hot key trigger to execute when the key is tapped (press and released quickly) each time, the first tap, double tapped, triple tapped, or quadruple tapped (v7.0+). Keep in mind that Keyboard Maestro cannot see the future, so “tapped once” will fire even on the first tap even if you tap the key twice (“tapped” would fire both times).

Keyboard maestro 8 0 3 – hot key tasking solutions

You can use the %TriggerValue% Text Token to determine the hot key that was typed.

Keyboard Maestro 8 0 3 – Hot Key Tasking Solution Using

If + is working to popup the context menu you could use an external tool like Autohotkey to define a macro which you assign to a single key press or combination. You don't need an external tool if you happen to use a programable keyboard or programmable mouse keys to assign the two key actions to a single button or click.

Hot Keys will override application menu Command Keys or any other keys typically used in applications, but if any other application registers the same hot key, then both your macro and the other application's action will happen.

⚠️ Note that whether or not a key typed by Keyboard Maestro itself will trigger a hot key (and thus be swallowed and execute a macro) or not (and thus go through to the application is not defined - either behaviour may happen and which behaviour happens will vary depending on many unpredictable factors.

So keep in mind that regardless of whether you trigger the macro on hot key pressed, down, released or tapped, the key is swallowed by the system and cannot be used for its normal purposes. You can use the USB_Device_Key trigger if you you want to trigger the macro without the system swallowing the key.

Modifiers alone (eg just Control) cannot be used as a hot key, although you can use the USB_Device_Key trigger to detect modifier key presses as well as other button presses like the mouse buttons or keys on non-standard keyboards like the XK-24.

Hot Keys suffer from the drawback that you need to remember a cryptic keystroke. This can be mitigated by selecting consistent keystrokes (such as Control-Letter to mean insert text and Control-Option-Letter to mean launch an application). You can also use a tool like KeyCue to display command keys and macro hot keys.

To further help with this, if multiple macros are executed with the same hot key, the conflicting macros are displayed in a palette allowing you to select the desired macro. You can select a macro from the palette using either number keys, or by typing the first distinct character to filter the macros down until only one is left. You could use this feature to allow a single hot key to do multiple user-selected actions.

A note on terminology:

  • Hot Key - system wide hot key API (swallows keys and overrides other behaviours, fires in every application that registers it).
  • Command Key (or Menu Command Keys or sometimes Menu Shortcut) - menu keys for selecting a menu, usually but not always with the Command key modifier, generally application specific (except for the shared menus like the Services, but they are still application specific, but the menu is duplicated in each application like the Edit menu typically is).
  • Keyboard Shortcut - could be either (hence the use in the System Preferences, Keyboard preferences).

Note: Revised on December 4, 2018 with a much better implementation of the pop-up palette, and some changes in timing and mouse movement.

One of the 'problems' with Keyboard Maestro is that it's so useful I use it a lot, leading to a large collection of macros. Due to the number of macros, sometimes when I want to add a new shortcut, I can't remember if I've used that shortcut before or not. Today's tip comes in two flavors to address that problem: Simple and Complex.

Short of just trying the shortcut, there's a way to check from within Keyboard Maestro itself: Type the macro's activation keys into the search box, as seen in the box at right.

You can't do this by pressing the actual shortcut keys—you have to type their character representations. You can do this with the 'Show Emoji & Symbols' option under the flag icon in the menu bar, if you've enabled it in the Keyboard System Preferences panel. But finding those few special keys (if you even know how to search for them) is a pain.

Technically, you could also use the pop-up character palette macro I wrote, except there's an issue: When the palette activates, it deactivates the search box, so the characters don't make it there. It's also overkill for this task, because there are characters that wouldn't be part of keyboard shortcuts, and you'd never need the HTML codes, just the characters.

So I wrote what wound up being a set of new macros that make searching for assigned keyboard shortcuts much easier.

The Complex solution

I wanted a really-easy way to search assigned shortcuts, one that wouldn't require opening the Keyboard/Emoji viewer, and was only active within Keyboard Maestro. After some tinkering, I wound up with two new macro groups, a new character palette macro, and a new macro to display the new character palette. Huh?

Basically, those things all work together to pop-up an easy-to-use palette when I'm searching, as seen in the image at right. This palette doesn't pop up automatically; I have it paired to a 'search for keyboard shortcuts' hot key—that way, I can use both it and normal (⌘F) search modes.

You can, as usual, download the macros to edit/use as you wish. This archive contains all of the groups and macros discussed below.

Step one: Create a Keyboard Maestro app macro group

This group contains macros that are only available within the Keyboard Maestro app, that is, when you have the Keyboard Maestro editor window open. The group setup is really simple, just set the 'Available in these applications' pop-up to show Keyboard Maestro:

I named this group _KM, and it's only going to hold one macro (unless/until I have more macros that only run when Keyboard Maestro is active).

Step two: Create a new macro in the new macro group

This macro will be the one you trigger to search for your keyboard shortcuts, so assign it an easy keyboard shortcut, and give it a fitting name. Because this is a Find shortcut, I assigned it to ⌘⌃F and named it Find by Special Char. (In the original version of this post, I had assigned it to ⌘⌥F, but Keyboard Maestro now uses that for 'Find in All Macros'). Here's how this macro looks:

The macro waits a split second (because I found it sometimes failed if I didn't do this), then sends a ⌘⌥F to activate the search box—searching the All Macros level. (If you want to only search whatever sub-group you've chosen, change that to ⌘F).

It then moves the cursor to a spot down and left of the top-right corner of the window, activates another macro group, pauses again, and then moves the cursor once more. So what's all that about?

The first mouse move is to a fixed location near the find box because a pop-up palette of keys will soon appear in that location…that's what the activated macro group does—it activates a palette under the mouse. Once the palette is onscreen, another quick pause, then the mouse is moved to the 'x' box of the pop-up palette, for easy dismissal.

If you're writing these on your own, you won't have the macro group yet, so just insert the step but leave it set to 'none' until you have the next bit done.

Step three: Create another new macro group

This second macro group is set up to activate only in certain situations:

As you can see, the macros in this group will only run within Keyboard Maestro, and only when the editing window is frontmost. No activation keys are defined, because the palette will only be visible when called by the first macro.

So what's on the palette? These four macros…

These are simply the four keys that I use as modifier keys in my shortcuts—it'd be easy to add more, if I used the arrow keys, too, for instance. Each is a very simple two-step macro with a single-key activation key and the special character. Here's the macro for the ⌘ key, for example:

Keyboard Maestro 8 0 3 – Hot Key Tasking Solutions

These can be triggered by single key shortcuts because they're only active when the macro group is active, and that's only true if I've activated the 'search for keyboard shortcuts' macro. And that's pretty much all there is to searching for my macros with a macro and a pop-up palette. (You have to manually close the palette when done; I haven't found a way to make it auto-dismiss—but with the mouse over the close icon, that's easy to do.)

Note: Search in Keyboard Maestro wil find all references to the keyboard shortcuts—not just those defined as keyboard shortcuts. This is why you'll probably see non-matching results when you search on special characters. But if you click into one of the apparently non-matching results, you'll find the hot key combo somewhere in there.

Keyboard Maestro 8 0 3 – Hot Key Tasking Solution Key

Related Posts: