CopyQ icon indicating copy to clipboard operation
CopyQ copied to clipboard

Add a tooltip with an item preview, when pressed Next/Previous item hotkey

Open Alex-302 opened this issue 7 months ago • 3 comments

Is your feature request related to a problem? Please describe.

Hi In Windows, I use Clipdiary. It shows a tooltip with a preview of the clipboard item (text or image) when navigating through history with a hotkey. On macOS, CopyQ doesn't show which item is selected unless the main window is open. This makes it difficult to paste the right content quickly without opening the app window.

Cases where it matters:

  • there is a sequence of copied text or images (usually in a row) that I want to paste, keeping them in order;
  • I want to reuse recently (usually, some in the last ~20 items, in my case) copied text when filling out various forms.

Describe the solution you'd like

A tooltip (or a small floating window, which exists until the last key of a hotkey is not released) will eliminate the need to open the program window when working with recently copied items.

Example:

Image

Same with images.

Alex-302 avatar May 04 '25 11:05 Alex-302

The next/prev commands show notifications only if the notifications are is enabled in Preferences.

hluk avatar May 29 '25 11:05 hluk

Ok, I see it now. Just default interval was 0. However, native notifications are not very convenient for making selections. In Clipdiary, the tooltip remains visible until you release the hotkey. When navigating without releasing the hotkey, the tooltip content changes without having to wait for it to time out. Not a problem, if you just selece one previous/next. I don't know if it's possible to do something similar in Macos.

Alex-302 avatar May 29 '25 15:05 Alex-302

In Clipdiary, the tooltip remains visible until you release the hotkey.

I think the following commands could solve the problem, but it depends on the notification handling in your desktop environment (here is how to add the command to CopyQ; you need to remap the shortcuts in the commands after adding them):

[Commands]
1\Command="
    copyq:
    next();
    notification(
      '.id', 'next-previous',
      '.urgency', 'low',
      '.persistent', false,
      '.title', 'Next Selected',
      '.message', clipboard(),
      '.time', 5000
    );
    while (queryKeyboardModifiers().length) { sleep(500); }
    notification('.id', 'next-previous', '.time', 0);"
1\Icon=\xf0ab
1\Name=Next
1\GlobalShortcut=ctrl+shift+n
1\IsGlobalShortcut=true
2\Command="
    copyq:
    previous();
    notification(
      '.id', 'next-previous',
      '.urgency', 'low',
      '.persistent', false,
      '.title', 'Previous Selected',
      '.message', clipboard(),
      '.time', 5000
    );
    while (queryKeyboardModifiers().length) { sleep(500); }
    notification('.id', 'next-previous', '.time', 0);"
2\Icon=\xf0aa
2\Name=Previous
2\GlobalShortcut=ctrl+shift+p
2\IsGlobalShortcut=true
size=2

hluk avatar Jun 04 '25 07:06 hluk