Skip to content

feat: :mouse hands the mouse back to the terminal, and takes it again - #49

Merged
bspeelm merged 1 commit into
mainfrom
feat/mouse-toggle
Nov 26, 2026
Merged

bspeelm merged 1 commit into
mainfrom
feat/mouse-toggle

Conversation

@bspeelm

@bspeelm bspeelm commented Nov 26, 2026

Copy link
Copy Markdown
Collaborator

:mouse turns mouse reporting off, and typed again turns it back on. It lasts until pullpen quits.

Counter-argument first. A terminal with poor mouse support mostly just sends nothing, so capture costs it nothing and a switch is clutter. What survives is text selection: while pullpen has the mouse, most terminals select only with Shift held, and a terminal that reports the mouse wrongly has no way out short of quitting. It is a command and not a key, as ADR-028 asks.

The setting lives on App (ui.mouse) and the event loop makes the terminal follow it, so coming back from $EDITOR keeps it off.

Wiki. Commands lists :mouse; Keys explains Shift and the toggle; Troubleshooting has an entry for "dragging does not select text"; Your first session says the mouse works and links to the table.

Proof

  • make check passes (code 11,390 of 11,500).
  • mouse_turns_the_mouse_off_and_the_next_one_turns_it_back_on in crates/pullpen-ui/src/app/input/tests.rs.
  • Release binary in a pseudo-terminal: :mouse writes ?1006l ?1003l ?1002l ?1000l and says "mouse off", the next writes ?1000h ?1002h ?1003h ?1006h and says "mouse on".

Not in this PR: a [ui] mouse = false setting to start with it off. Not verified: Windows Terminal.

🤖 Generated with Claude Code

While pullpen reports the mouse, most terminals select text only with
Shift held, and a terminal that reports it badly has no way out. :mouse
turns reporting off until it is typed again or pullpen quits.

The wiki says what the mouse does in the first session, lists :mouse
with the commands, and names it in troubleshooting.

Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
@bspeelm
bspeelm merged commit eda0855 into main Nov 26, 2026
14 of 15 checks passed
@bspeelm
bspeelm deleted the feat/mouse-toggle branch November 26, 2026 17:58
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant