Pressing show main window hotkey with window active selects next item list #1596
Replies: 2 comments 1 reply
-
It's not that simple. This is usually handled by a script mapped to a global shortcut. I think following commands could emulate what you describe. To cancel it the Ctrl+Shift+V, there is another command mapped to Ctrl+Shift+Esc so simply pressing Esc key cancels the cycle and leaves the window open without copy/pasting anything. Here is how to add the command to CopyQ. [Commands]
1\Command="
copyq:
var settingsName = 'index_to_paste';
if (focused()) {
var i = parseInt(settings(settingsName)) + 1;
selectItems(i);
settings(settingsName, i);
} else {
selectItems(0);
settings(settingsName, 0);
show();
while (queryKeyboardModifiers().length > 0) {
sleep(25);
}
var i = parseInt(settings(settingsName));
if (i < 0)
abort()
hide();
select(i);
paste();
}"
1\GlobalShortcut=ctrl+shift+v
1\Icon=\xf0ea
1\IsGlobalShortcut=true
1\Name=Show Select Paste
2\Command="
copyq:
var settingsName = 'index_to_paste';
settings(settingsName, -1);
selectItems(0);"
2\GlobalShortcut=ctrl+shift+esc
2\Icon=\xf0ea
2\IsGlobalShortcut=true
2\Name=Show Select Paste (Cancel)
size=2 |
Beta Was this translation helpful? Give feedback.
-
FYI to anyone that reads this in the future. To make it switch to the clipboard tab when you use this script, just replace show() with show("&clipboard") in the if else statement. |
Beta Was this translation helpful? Give feedback.
-
I have a feature I'd like to see in CopyQ. This is something I've been messing with Windows through AutoHotKey scripts. On my Linux computers, I don't have this functionality. I'd love to see this feature in the official version.
I call it "Repetitive Hotkey Scroll Down" or "Quick-key Scroll Down"...as an example:
I use Ctrl + Shift + V to show the main window. When the window opens, the first line in the list is selected.
If I press Ctrl + Shift + V again, the next item on the list will be selected. If I press again, next item, again next, again next....
I can do this as many time as I want (or the end of the list). When I release Ctrl + Shift the window closes and pastes the highlighted item wherever it goes.
If I do anything else, click an item, press any other key while Ctrl + Shift is held down, the cycle is broken and the window remains open and functions just how it is now.
I am totally willing to help implement and test. Where can I find the open-window-on-hotkey-press code in the code?
Beta Was this translation helpful? Give feedback.
All reactions