Skip to content

Validate and paste with enter #7

Description

@hadoukim

Before you start

  • I searched existing issues and didn't find this already requested.

What problem does this solve?

The main window can only be operated with the mouse. After filtering the history
with the search box, there's no way to pick and paste a clip from the keyboard —
pressing Enter does nothing and the window stays open, so you have to reach for the
mouse to click the result. This breaks the "one keypress and back to typing" flow
the app is built around.

Steps to reproduce:

  1. Open the window with the global shortcut (e.g. Super+V).
  2. Type a few characters to filter the history.
  3. Press Enter — nothing happens; the window stays open.

The clip can only be selected by clicking it with the mouse.

Proposed solution

Add keyboard navigation to the main window so a clip can be selected and pasted
without the mouse:

  • Switch the list from SelectionMode::NONE to SelectionMode::SINGLE and give the
    search entry focus on open, so typing filters while a row stays highlighted.
  • Support Up/Down to move the selection through the filtered rows, keeping the
    selection valid as the filter changes (default to the first visible row).
  • Connect signal_row_activated — and an Enter key handler — to the same copy()
    path the mouse click already uses, then close the window.
  • Handle Escape in the main window to dismiss without pasting.

From reading the source, the current behavior comes from: the list being created
with SelectionMode::NONE in MainWindow.cpp (no "current row" for Enter to act on);
ClipCard only reacting to a GestureClick with no key controller or row-activated
handler; and Enter/Escape being handled only in the shortcut-capture dialog, never
in the main window.

Alternatives you've considered

  • Keeping mouse-only interaction — this is the current behavior and the reason for
    filing the issue; it defeats the keyboard-driven workflow.
  • Number/letter accelerators to pick a row (e.g. Alt+1..9) — faster for power users
    but less discoverable and awkward beyond the first few rows; arrow + Enter is the
    conventional, expected pattern.
  • Vim-style Ctrl+J/K instead of arrows — could be offered as an addition, but arrow
    keys should be the default so it works without prior knowledge.

Anything else?

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions