Note: Revised on December 4, 2018 with a much better implementation of the pop-up palette, and some changes in timing and mouse movement.
- Keyboard Maestro 6 3 2 – Hot Key Tasking Solution Key
- Keyboard Maestro 6 3 2 – Hot Key Tasking Solutions
- Keyboard Maestro 6 3 2 – Hot Key Tasking Solution Answer
- Keyboard Maestro 6 3 2 – Hot Key Tasking Solution Using
I'd like to define a Keyboard Maestro macro that I can trigger if I enter a certain key chord. As a reminder, key chords are sequences of two hot key presses. Many editors like Emacs, Visual Studio etc. Support them and they can vastly expand the set of possible hot key combinations one can use to manage any action.
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.
- Multimedia keys such as Play/Pause, Volume Up/Down, Stop, Browser and others are supported. To verify Hot Keyboard supports a key - click on a hot key prompt and press the key. The following keys can be used as modifiers: Shift Ctrl Alt so you can set: +.
- There’s almost no limit to what you can accomplish with a single keypress using Keyboard Maestro; Keyboard shortcuts aren’t the only thing you can do with Keyboard Maestro. You can use it to fill in complex forms, Tweet your favourite Spotify songs and much much more. Unfortunately, there’s a steep learning curve to the app, so creating.
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 Hall oates private eyes 1981 rar. , 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. The long dark wintermute map. Here's the macro for the ⌘ key, for example:
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.
Related Posts:
(Originally posted 2019-06-18.)
In Automation On Tap I talked about NFC tags and QR codes as ways of initiating automation.
This post is about a different initiator of automation.
I recently acquired the cheapest (and least functional) Elgato Stream Deck. This is a programmable array of buttons. My version has 6 buttons but you can buy one with 15 and one with 32 buttons.
A Previous Attempt Didn’t Push My Buttons
A while back I bought an external numeric keypad for my MacBook Pro. When I was editing our podcast with Audacity on the Mac I used this keypad to edit. It’s just numeric, with a few subsidiary keys.
What makes this programmable is that the Mac sees external keypad keys as distinct from their main-keyboard counterparts. So the “1” key on the external keypad has a different hardware code from the “1” key on the main keyboard. Keyboard Maestro macros can be triggered when keys are pressed. So I wrote macros to control Audacity, triggered by pressing keys on the external keypad.
But there was a problem: How do you know what each button does? It’s quite a pretty keypad – as you can see:
So I really didn’t want to stick labels on the key tops. I also tried to make my own template but there was an obvious difficulty: It’s hard to design one that tells you what the middle buttons in a cluster do.
There’s another problem: Suppose I set up automation for multiple apps – which Keyboard Maestro lets you do. Then I need a template for each app – as each will probably have its own key pad requirements. These templates are fragile and in any case this is a fiddly solution.
So this was good – up to a point. It certainly made podcast editing easier. But that was all.
And then I moved podcast editing to Ferrite on iOS, discussed here. And this keypad is now in a drawer. ?
The One That I Want
Cue the Elgato Stream Deck Mini. First I should say there are other programmable keypads but this is the one that people talk about. I’d say with good reason.
As you can see, it’s corded and plugs into a USB A port.[1] Power to it is supplied by this cable.
It’s easy to set up, literally just plugging it in. To make it useful, though, you need their app – which is available for Mac or Windows. It’s a free app so no problem.
With their app you drag icons onto a grid that represents the Stream Deck’s buttons. Here’s what mine generally looks like when powered up and the Mac unlocked.
The key thing[2] to notice is the icons on the key tops. This is already a big advance on paper templates and ruined shiny key pads. I didn’t have to do anything to get these icons to show up[3]. What you can see is:
- 4 applications – Sublime Text, Drafts, Airmail and Firefox.
- A folder called “More”. More ? on this in a moment.
- Omnifocus Today
The applications are straightforward, but the Omnifocus Today one is more complex. Pushing the button simulates a hot key – in this case Ctrl+Alt+Shift+Cmd+T. I’ve set up a Keyboard Maestro script triggered by this – extremely difficult to type – hot key combination. This script brings Omnifocus (my task manager) to the front and – via a couple of key presses – switches to my Today perspective.
So it’s not just launching applications. It can kick off more complex automation.
And someone built a bridge to IFTTT’s Maker Channel – which could open up quite a lot of automation possibilities. But right now I only have a test one – which emails me when I press the button.
One thing I haven’t tried yet is setting up buttons to open URLs in a browser. I don’t think I’ve got the real estate for that, with only six buttons.
Unreal Estate
In reality I probably should’ve plumped for the 15 button one[4], rather than the 6, but this has been an interesting exercise in dealing with limited button “real estate”.
So, if I press the “More” button I get this:
Because the button tops are “soft” they can change dynamically – as this demonstrates. This is much better than sticking labels on physical keys.
Keyboard Maestro 6 3 2 – Hot Key Tasking Solution Key
Two features of note:
- The back button – top left
- The “Still More” button bottom right
Being able to create the latter means I can nest folders within folders. This greatly increases my ability to define buttons.
The Right Profile
There’s one final trick that’s worth sharing.
Everything I’ve shown you so far has been from the Default Profile. You can set up different profiles for different apps.
I happen to have a few Keyboard Maestro macros for Excel – to make it a littleless tedious to use. So I created a profile for Excel.
So when Excel is in the foreground the Stream Deck looks like this:
I’m still setting it up – and you can see two undefined (blank) buttons. – but you get the general idea. The two Excel-specific buttons – using an image I got off the web[5] – kick off some really quite complex AppleScript:
- Size Graph – which resizes the current Excel graph to a standard-for-me 20cm high and 30cm wide. This is fiddly so having a single button press to do it is rather nice.
- Save Graph – which fiddles with menus to get to the ability to save a graph as a .PNG file with a single button press.
(In retrospect I should probably have changed the text to black – which is easy to do.)
Keyboard Maestro 6 3 2 – Hot Key Tasking Solutions
So in real estate terms, application-specific profiles are really handy.
One pro tip: Close the Stream Deck editor if you want application-specific profiles to work. I spent ages wondering why they didn’t – until I closed the editor.
Conclusion
This programmable key pad with dynamically-changing keytops is a really nice way to kick off automation from a single key press (or a few if you use cascading menus).
I would go for the most expensive one you can afford – but I’ve shown you ways you can get round the 6-button constraint in the Stream Deck Mini.
Application-specific profiles are a really nice touch.
The whole thing is rather fun for an inveterate tinkerer like me. ?
In short, I think I’ll be throwing this in my backpack and taking it with me wherever my MacBook Pro goes.
Keyboard Maestro 6 3 2 – Hot Key Tasking Solution Answer
And one day I’ll upgrade to a model with more buttons.
Keyboard Maestro 6 3 2 – Hot Key Tasking Solution Using
- As they say not to use a USB hub I don’t know if it would plug into USB C via an adapter. ↩
- Pun intended. ↩
- Except the OmniFocus one – where I had to find an icon – but even that was easy. ↩
- At much greater cost, of course. Still more so with the 32-button variant. ↩
- You can create your own icons using a nice editor they have, which contains quite a wide variety of icons. But Excel wasn’t one of them – so I found an image and used that. The preferred dimensions are a 72-pixel square. ↩