I’ve been switching all my old workflows over from Automator and Alfred after discovering Keyboard Maestro and almost every one of them has been made so much better and easier thanks to KM.
The one that I have left that I’ve been working on the longest is trying to mimic one of my favorite features in Alfred:
When bringing up their version of the “Clipboard History Switcher” I could press CMD-1 to paste the first item, CMD-2 to paste the second item, etc.
I’ve tried so many different combinations and methods to try to get something close in the KM “Clipboard History Switcher” but the main problem I keep running into is that the “Clipboard History Switcher” never seems to be the “front window” or “focused window”
This is the post from Peter that explains what I’m trying to say is the issue I keep having:
"peternlewisElderSep '15
The change that is affecting this is that the front application is now pretty much always the application with the menu bar as opposed to a background application that owns the front window.
This is probably not a good thing per se, it comes as part of the whole change to the “modern” running application API. I will be looking at this to see whether I can restore the old behaviour, but its non trivial.
Because of this change, the “front window” condition will not see the Clipboard History Switcher window."
Does anyone have any ideas or workarounds?
I like that.
I hope @peternlewis can figure out a way to make it happen.
The easiest way at this point would be to create a new macro group, with macros like:
Trigger: Command-2, Action: Set Clipboard to Past Clipboard: 1, Paste.
Then configure the macro group to be active for one action after another hot key. And then do:
hot key, Command-2
Not as elegant as “active when the clipboard switcher is current” but it’s the closest you can do currently.
Bonus points, it works any time.
Personally, the only one I use is Paste Previous Clipboard which I have Command-Control-V do.
Thanks so much Peter! For some reason, setting it up that way would always paste the top result the first time the Clipboard History Switcher was shown but then worked fine every time after, but thanks to your suggestion of the "active for one action" option that I wasn't aware of, I was able to get it working exactly like I wanted.
I made a macro group as suggested that is only active for one action after another hot key is pressed, in my case Option-Command-C, then I went to the built-in "Activate Clipboard History Switcher" action and added "Type the Option-Command-C Keystroke" after it, so now it activates my new macro group automatically, then I just press Command-1, Command-2, etc. like I'm used to for pasting any of the items in the list.
Since the "Set Clipboard to Past Clipboard" action kept giving me problems on the first time (always pasted the 1st item in the list on the first try then worked fine after), I changed it to just use the down arrow keys which is working: