[Feature Request] Add scroll-only mouse mode to disable clicks while preserving wheel scrolling

Status Fixed / completed
Reported on v2.1.187
Maintainer reply ✓ Yes — bcherny
Activity 15 comments · opened Jun 24, 2026 · closed Aug 17, 2026
💡 Likely answer: A maintainer (bcherny, collaborator) responded on this thread — see the highlighted reply below.

Bug Description
Feature request: scroll-only mouse mode in full-screen view In full-screen mode, mouse handling is all-or-nothing. With the mouse enabled, clicking into the terminal to focus it (or any stray click) can accidentally hit buttons or expand/collapse tool output. The only mitigation, CLAUDE_CODE_DISABLE_MOUSE=1, also kills mouse-wheel scrolling, which is the part I want to keep. Please add a mode that ignores mouse clicks but keeps wheel scrolling — e.g. a CLAUDE_CODE_DISABLE_MOUSE=clicks value or a mouseMode: "scroll-only" setting. That would let me scroll with the wheel (I have CLAUDE_CODE_SCROLL_SPEED set to 5) without accidental clicks landing on interactive elements.

Environment Info

  • Platform: linux
  • Terminal: vte-based
  • Version: 2.1.187
  • Feedback ID: 92c56d38-dba3-4af7-a37a-a7c79cbb9647

Errors

[]

View original on GitHub ↗

15 Comments

mattjhann · 3 months ago

I've been clicking back to the window to re-focus and hitting buttons accidentally. 'No' is frustrating. 'Yes' is potentially disastrous.

markheath · 3 months ago

Yes, this is highly irritating for me too (Claude Code CLI on Windows Terminal). I'll click on the terminal window to give it focus so I can answer the question and it randomly picks an option for me, and its not even always obvious what I accidentally picked. Seems to be a recent problem. I can see that clickable choices might be nice, but there at least ought to be a mouse-over hover highlight to make it really obvious what's going to happen.

mattjhann · 3 months ago

<img width="1036" height="204" alt="Image" src="https://github.com/user-attachments/assets/6dfa5ab0-c169-4546-ae02-366d89c4031a" />

Looks like the latest version includes this! Tested and working. I think this can be closed :)

karlb379 · 3 months ago

Running v2.1.195 on Windows Terminal. The new CLAUDE_CODE_DISABLE_MOUSE_CLICKS env var partially addresses this, but it also disables clicking to expand/collapse tool output (e.g. "Ran 2 shell commands"), which is useful UX.

My specific pain point: clicking the terminal window to ensure focus before using arrow keys accidentally accepts or denies permission prompts, requiring me to re-prompt Claude to retry the action. A granular option to disable clicks only on interactive prompt elements (yes/no dialogs, menu selections) while preserving clicks on collapsible output would solve this cleanly.

Tragen · 3 months ago
<img alt="Image" width="1036" height="204" src="https://private-user-images.githubusercontent.com/46447406/614013870-6dfa5ab0-c169-4546-ae02-366d89c4031a.png?jwt=eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3ODI2Mzg1OTEsIm5iZiI6MTc4MjYzODI5MSwicGF0aCI6Ii80NjQ0NzQwNi82MTQwMTM4NzAtNmRmYTVhYjAtYzE2OS00NTQ2LWFlMDItMzY2ZDg5YzQwMzFhLnBuZz9YLUFtei1BbGdvcml0aG09QVdTNC1ITUFDLVNIQTI1NiZYLUFtei1DcmVkZW50aWFsPUFLSUFWQ09EWUxTQTUzUFFLNFpBJTJGMjAyNjA2MjglMkZ1cy1lYXN0LTElMkZzMyUyRmF3czRfcmVxdWVzdCZYLUFtei1EYXRlPTIwMjYwNjI4VDA5MTgxMVomWC1BbXotRXhwaXJlcz0zMDAmWC1BbXotU2lnbmF0dXJlPTA1YmQ3NjdlZjUzN2I2NDhkOGU4OWI2ZjVmZjkyOTgxNzIzODRmNWE4OWUzNjA4ZjRiOGFhYjdiNDQ1OWJlY2QmWC1BbXotU2lnbmVkSGVhZGVycz1ob3N0JnJlc3BvbnNlLWNvbnRlbnQtdHlwZT1pbWFnZSUyRnBuZyJ9.pArfcstAI-a6xWBHjZ93DzGc6RsAeb1jZDF3hM1cChM"> Looks like the latest version includes this! Tested and working. I think this can be closed :)

Doesn't work for me correctly. Mouse clicks are disabled, but also text selection.

gijsbeijer · 3 months ago

Same here.

IMO the option should just be to just disable picking options by mouseclick. All other mouse actions should be preserved.

cworth-gh · 3 months ago

Or submitting a security prompt option could require two clicks: one to select and a second to submit.

The current behavior is definitely somewhere on the scale from annoying to disastrous.

skelleher · 3 months ago

The mouse-click behavior is proving increasingly frustrating and dangerous.
If I click anywhere in the window (to focus) claude 'accepts' one of the options and proceeds.

I agree with gijsbeijer; don't treat a mouse click like hitting enter key to 'confirm an option'. I'd much rather click to focus, then hit enter key.

J-Swift · 3 months ago

How annoying this feature is. I also was accidentally selecting answers in AskUserQuestion prompts, so I searched and found CLAUDE_CODE_DISABLE_MOUSE_CLICKS. Except now I cant select text to copy it! How are those the same thing???

mingoes · 3 months ago

Another data point: macOS + Ghostty, fullscreen TUI.

Tried both existing knobs and neither combination works:

  • CLAUDE_CODE_DISABLE_MOUSE_CLICKS=1 — stops the accidental prompt clicks, but the mouse is still captured, so native drag-to-select is dead (Shift+drag only). Unusable for copy-heavy workflows.
  • CLAUDE_CODE_DISABLE_MOUSE=1 — native selection works again, but now the wheel does nothing: no scrollback in the alt screen, so the only way through history is PgUp/PgDn (fn+arrows on a Mac keyboard).

So today it's pick-two-of-three between wheel scroll, native selection, and click safety. One possible zero-config fix: when mouse reporting is off, terminals with alternate-scroll (xterm alternateScroll, Ghostty supports it) translate wheel events to Up/Down arrows in the alt screen — if the fullscreen viewport treated those as scroll, CLAUDE_CODE_DISABLE_MOUSE=1 would get wheel scrolling back for free, no new mode needed.

scp-mb · 3 months ago

@J-Swift Have found that shift + click and drag will highlight text for copying with CLAUDE_CODE_DISABLE_MOUSE_CLICKS=1

dede34fr · 2 months ago

The scroll-only mode requested here shipped as CLAUDE_CODE_DISABLE_MOUSE_CLICKS (v2.1.195), and it does keep the wheel — but it comes with a side effect worth flagging on this thread: it does not give the terminal its text selection back.

Measured on 2.1.220 by capturing the raw stream of the fullscreen TUI in a pty:

  • CLAUDE_CODE_DISABLE_MOUSE_CLICKS=1 → the TUI still emits ?1000h ?1006h
  • CLAUDE_CODE_DISABLE_MOUSE=1 → emits nothing at all

?1000h is what makes the terminal hand mousedown to the application, so with the scroll-only mode a plain drag still selects nothing. The clicks stop reaching the TUI's own widgets — which is what this issue asked for — but the terminal remains in mouse-reporting mode. Anyone who came here for "no accidental clicks and I can still copy text with the mouse" only gets the first half.

If the goal is to preserve both wheel scrolling and native selection, the terminal has to stop reporting button presses; with the DEC modes alone there is no way to report only the wheel, since ?1000h covers all buttons including wheel buttons 64/65. A practical alternative is to leave that arbitration to the terminal — xterm.js has a mouseEventsRequireAlt option that keeps tracking armed but only while a modifier is held, so selection stays available by default (it is simply not exposed as a VS Code setting today).

Worth knowing meanwhile: Shift + drag forces a local selection in xterm/xterm.js regardless of what the application armed.

bcherny collaborator · 2 months ago

This shipped in v2.1.195: set CLAUDE_CODE_DISABLE_MOUSE_CLICKS=1 for a scroll-only mouse mode in fullscreen rendering. Clicks, drags, and hover are ignored while wheel scrolling (and CLAUDE_CODE_SCROLL_SPEED) keep working.

Docs: https://code.claude.com/docs/en/env-vars
Changelog: https://github.com/anthropics/claude-code/blob/main/CHANGELOG.md

Closing as shipped; please reopen if you hit issues after updating.

🤖 Generated with Claude Code

korncola · 1 month ago

this is NOT what people want, how many message do people need to write that you guys understand:
people just want the yes/no/question stuff not registered, while we still want to select, expand, mark etc.

lmller · 24 days ago

@korncola someone opened a new issue. https://github.com/anthropics/claude-code/issues/93162 hope they'll understand now...