Copyq: Number as shortcuts to paste item

Created on 2 Jul 2014  路  15Comments  路  Source: hluk/CopyQ

Unless I missed existing feature, I find it very unpractical to to j/k the list until I find the item I want.

It would be awesome if we could use number to paste item on that position, similar to what vim has with :number<cr> command.

Currently it starts up search for those numbers and I guess some people might want to have search for numbers available. This could be optional setting or could even require prefix like :

This feature, for example, exists in the best open source windows clipboard manager clcl

feature

Most helpful comment

Configure the global hotkeys which, in case they are pressed with number key (0-9) just paste the text. So I could have for instance ctrl+shift + (0-9) for a corresponding text in the clipboard.

That is very nice idea, and it totally fits my workflow. I use a lot first 10 items, but they are not on the main tab. So any hotkey will have to take tab into option.

All 15 comments

I think this feature existed in CopyQ few years back but was long forgotten. I'll add it back, it can really save keystrokes.

Added: 54dc0ed7c1d582648ff0a68fa55a60175a67610d

Just enter a number and appropriate row will be selected; additionally the number is highlighted in items as with normal search.

Thanks a lot for fast re-implementation :) I will test it ASAP and report any problems here.

Just enter a number and appropriate row will be selected; additionally the number is highlighted in items as with normal search.

"Appropriate row" may not be selected if numbers are content of preceding items. I tried with ^n but it actually eliminates the desired row always because number is not treated as regular expression start.

It does seem to work correctly for me. I enter number and item with that row number is selected. This works even if some preceding items contain the number as text -- these items are not hidden but neither are they selected.

You are right. Selection colors were not very visible so I missed it. Thanks.

Is this feature still working? I am searching high and low for such a feature as I am doing a lot of copy pasting repetitively and thought it must be somthing like pressing number or ctrl+number or alt+number, I means that't one of the first feature you think about and do it instinctively. I can't seem to find in docs and can't get it to work by just pressing the numbers with the window of CopyQ open. Halp!

You just press number while copy q windows is shown. Numbers are shown on the left. Number will be typed in search bar, don't that confuse you. So, is all you do.

It might be confusing that if there is the same number on some item before the one you want, it is also selected, but not as an item, but as a text. Along with that actuall item on that number is selected as item, not text.

Oh yeah figured that it's:
1) Open the CLIPBOARD window
2) Press the number of the stored text you want to paste
3) then ENTER to actually paste it

Thank you majkinetor for the response nonetheless!

How about:
1) Configure the global hotkeys which, in case they are pressed with number key (0-9) just paste the text. So I could have for instance ctrl+shift + (0-9) for a corresponding text in the clipboard.

My use case here is: I am pasting three different texts over and over, so I'd remember which one is which and it would save some steps. What do you think?

image
Someone described it for another tool.

Configure the global hotkeys which, in case they are pressed with number key (0-9) just paste the text. So I could have for instance ctrl+shift + (0-9) for a corresponding text in the clipboard.

That is very nice idea, and it totally fits my workflow. I use a lot first 10 items, but they are not on the main tab. So any hotkey will have to take tab into option.

Configure the global hotkeys which, in case they are pressed with number key (0-9) just paste the text. So I could have for instance ctrl+shift + (0-9) for a corresponding text in the clipboard.

You can make that work with following command (here is how to add the command to CopyQ).

[Command]
Command="
    copyq:
    var n = str(data(mimeShortcut)).slice(-1)
    select(n)"
GlobalShortcut=ctrl+shift+0, ctrl+shift+1, ctrl+shift+2, ctrl+shift+3, ctrl+shift+4, ctrl+shift+5, ctrl+shift+6, ctrl+shift+7, ctrl+shift+8, ctrl+shift+9
Icon=\xf0cb
IsGlobalShortcut=true
Name=Select Nth Item

The behavior depends on current settings in the History config tab in Preferences dialog.

image

CopyQ rocks as always. Thx @hluk

Awesome!! I'd just add to it paste() at the end like that:

[Command] Command=" copyq: var n = str(data(mimeShortcut)).slice(-1) select(n) paste()" GlobalShortcut=ctrl+shift+0, ctrl+shift+1, ctrl+shift+2, ctrl+shift+3, ctrl+shift+4, ctrl+shift+5, ctrl+shift+6, ctrl+shift+7, ctrl+shift+8, ctrl+shift+9 Icon=\xf0cb IsGlobalShortcut=true Name=Select and Paste Nth Item

image

Was this page helpful?
0 / 5 - 0 ratings

Related issues

orschiro picture orschiro  路  7Comments

lepalmtree picture lepalmtree  路  7Comments

pacid picture pacid  路  3Comments

happysurf picture happysurf  路  9Comments

m4r71n picture m4r71n  路  5Comments