-
Notifications
You must be signed in to change notification settings - Fork 449
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[vi-mode] mapping ctrl+{j,k} to next/previous is buggy in search mode #1511
Comments
The "Copy next/previous item" predefined commands are used to copy the following item. You probably want this command: [Command]
Command="
copyq:
var shortcut = str(data(mimeShortcut))
var row = selectedItems()[0]
if (shortcut == 'ctrl+j')
selectItems(row + 1)
else
selectItems(row - 1)"
Icon=\xf338
InMenu=true
Name=Up/Down
Shortcut=ctrl+j, ctrl+k |
That's just amazing. Thanks! |
Just noticed it's not quite same as moving by arrows. A
Now if user had used arrow keys in step B What's up with these cases? Am on same copyq & qt ver as in the original post. |
F2 shortcut works only if the item list has keyboard focus. When you search, it is the filter text box that is focused. You may need to override the shortcut so it works when filtering: [Command]
Command="
copyq:
edit(currentItem())"
Icon=\xf044
InMenu=true
Name=Edit Current
Shortcut=f2 In the B case, using [Command]
Command="
copyq:
var shortcut = str(data(mimeShortcut))
var row = currentItem()
if (shortcut == 'ctrl+j')
selectItems(row + 1)
else
selectItems(row - 1)"
Icon=\xf338
InMenu=true
Name=Up/Down
Shortcut=ctrl+j, ctrl+k |
All valid solutions, awesome!
Note functionally everything works, just the (think it's qt's?) error is shown. |
My guess is that External editor command in configuration (History tab) is not configured correctly (the editor program is not found). The |
- Up/Down is the ctrl+{j,k} - Edit Current makes sure F2 always works - both these cases are described here: hluk/CopyQ#1511 (comment)
Clarification
The goal of using
next
&previous
commands is to move the selection in clipboard elements in the same manner as arrow Down & Up are behaving by default.Reproduction:
ctrl+{j,k}
to next/previous, in parallel to defaultUp/Down
arrow./
and filter your clipboard down to smaller number of elementsExpected result:
ctrl+{j,k}
should behave the same as Up/Down arrow in this filtered search modeActual result:
Looks like
ctrl+{j,k}
are still working against the full list of elements, although filtered list of elements is shown.copyq-commands.ini contents defining the mappings:
Version, OS and Environment
The text was updated successfully, but these errors were encountered: