Skip to content

Mouse support (click row → cursor, wheel → scroll, click link → open) #34

Description

@m5d215

Idea

Capture terminal mouse events and support interactions like:

  • Scroll wheel → scroll one line
  • Left click on a row → move the cursor to that row
  • Left click on a link row → open it
  • Click on a directory-browser row → select / enter it

Technically feasible via crossterm's EnableMouseCapture + Event::Mouse. Mapping screen coordinates back to logical lines can reuse the existing screen_rows data.

Tradeoff

Enabling mouse capture disables native terminal text-selection copy in many terminals (iTerm2 / kitty allow bypass via Option/Shift; tmux has its own rules). The existing y yank mitigates this, but it's still a minor regression for users who copy directly from the terminal.

Direction (undecided)

  • Opt-in via config (mouse = true in config.toml), or
  • Enabled by default with a --no-mouse flag to disable

Status

Low priority. Revisit when there's a concrete need.

Related context

The user's ~/.tmux.conf already translates wheel events to ↑/↓ keys for alt-screen apps, so wheel-based scrolling already works without explicit mouse support. The remaining value is point-and-click interactions (row click, link click), not scrolling.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

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