Selection by Number in Clipboard History Switcher

Would it be possible to implement selection by number when the Clipboard History is activated? Perhaps including the number before the clipboard entry. I suspect that either this is difficult or deemed inappropriate otherwise it would already be there, but….

I already have a set of macros with names "Paste Clipboard 1", etc., bound to ⌃⌥1, etc., but sometimes I lose track and want to see the visible display. Pressing a digit would be much faster and more convenient than wandering around with the mouse (for us keystroke fanatics).

1 Like

There's two ways to approach it as far as I know. (You'll have to wait for others to respond as far as getting them numbered but I think it involves add two digits and a bracket as in xx) or "02)" in the Macro name.)

What I like to do is assign the same keyboard shortcut to the group (that may change later), so for example when I want to move items to specific folders using the keyboard shortcut "CONTROL+M", I assign "CONTROL+M" to all of them. Which then allows me to hit a letter to choose the one I want.

You can play around with the phrase and name used to get the desired letter (if there's a name for your item that matches the letter you want to use). So for example I first wanted to use "M" for "Movies" but I had already used it for "Music" so "M" wasn't available. So I used "Vid" for "Movies" instead. When I need to move something to the "Movies" folder I just use the keyboard shortcut CONTROL+M to trigger the macro, then when the menu pops up I type the letter "V" which then selects "Move to Vid Folder.

Yeah, that’s a different approach — using a conflict palette. There are reasons to do it either way. One reason to use a regular, not conflict palette, is the difficulty in giving the macros names that are sufficiently distinct to be able to say which one you want in a key or two. A regular palette allows assigning arbitrary keystrokes to each entry.

Adding numbers to the Clipboard History is on the todo list, although when or if it will ever happen is unknown.

2 Likes

Another improvement would be to allow forward typing without having to hit ⌘F before. (See LaunchBar.)

Clipboard History Numbers would be helpful to me also.

1 Like

:star: I concur with MitchellModel & troy. Clipboard History Numbers would be pretty nice to have.

As of today when I press a number the selection moves to what seems random, like if I press 7 it highlights 4 for example.

Related: Clipboard history switcher pasting numbers 1-9. JMichaelTX has a macro here, though it has a pop up window, and the need to press enter after a number is typed. It also blocks using the down arrow with the popup, an integrated solution where both are possible w/out the enter is what I'm thinking of, I think others in this discussion are thinking of it too?

Numbers do not mean anything - it is type selecting. So when you press "7", it moves to the first entry alphabetically after "7".

The Clipboard History Switcher has numbers, though I am going to adjust them to match the Past Clipboard numbers (ie, System Clipboard, then 1, 2, 3, 4).

I will probably add Command-1, Command-2 to paste entries.

3 Likes

I just found out that CMD-1, -2 etc. is already implemented. Thanks!

1 Like

Hey Lars,

That's not working for me...

You're just bringing up the Clipboard-Switcher and hitting Cmd-2, etc?

-Chris

Ah no! It is not working! I just thought it worked but it just seemed so because hitting a number just selected the right thing as a coincidence... (as described by Peter) Sorry.

Oh, well. Too bad.

@peternlewis – did this not make the cut?

-Chris

Yes, it's done. It should work - the Clipboard History Switcher has to have focus for it to work.

Hey Peter,

I'm having problems with Selection by Number on macOS 10.14.6 Mojave.

What the following means is unclear:

Command-Control/Option/Shift-numbers

I don't see it in the documentation yet.

When testing all the key chords the only one I'm finding that works is:

Cmd-Opt-Num

It copies the numbered clipboard into the system clipboard and dismisses the Clipboard History window – but it does NOT return to the application context that was frontmost when the CH window was activated.

I have to manually return to the application context and then paste. So far the Bring Application Windows to Front action works sufficiently for this.

But – the CH viewer macro fails to open the CH window on the next activation of the hotkey.

-Chris

https://wiki.keyboardmaestro.com/manual/Clipboard_History_Switcher

Command-Numbers will paste the corresponding entry. Command-Shift-Numbers will paste in plain text, and Command-Option-Numbers will just set the system clipboard.

Yes, not re-activating the target app seems to be an issue.

Yes, I expect that is related.

Command-Numbers seem to work ok for me. It's possible something else is interfering with them or there is something different in Mojave.

Hey Peter,

I got Cmd-Num to work here in in BBEdit and TextEdit, although there are intermittent failures in BBEdit.

Neither of these apps worked when I was previously testing, and as far as I know I haven't changed anything since then...

Cmd-Opt-Num has been working, I just didn't know that it was only copying to the clipboard.

Cmd-Shift-Num is a bit of a problem in that it interferes with screenshot hotkeys.

I also had some Cmd-Shift-1 & 2 assigned to Typinator functions.

I'll reboot here in a bit just for giggles and test some more.

-Chris

You can also add the Control key in without affecting the results.

That doesn't seem to work at all here.

And when Control is pressed it doesn't stop the screenshot keys from working...

-Chris

Any combination of modifiers, as long as the command key is down, is accepted.

If the Shift key or the Control key is down, it does "plain text"
If the Option key is down, it just sets the clipboard and does not paste.

Any combination of modifiers works, so you need to use one that is not used by the system.

The system defaults use Command, and Shift, or Control&Shift.

So you can use Control without Shift, or Option.

There are limited choices for the available modifiers, so that is the best I can do.

Note that these are not hot keys, they are command keys, while the window is focussed only, and only assuming the system decides to get the window precedence over other places the command keys can be implemented.

I resolved the issue with the Command-Option-Numbers. Basically, that should never close the window, since it does not paste, but I think it was half-closing the window.

As far as the Command-Numbers not working, I don't know why that might be. The window has to have focus for any of these to work, so if you have clicked back in to the target application, they will not work, since they are menu command-keys, not global hot keys. But it works in my tests in both Big Sur and High Sierra.

1 Like