Allow disabling click-to-select on option lists without losing text selection or scrolling

Status Open
Reported on v2.1.266
Maintainer reply None cached
Activity 0 comments · opened Sep 9, 2026

What I want

A way to turn off click-to-select on presented option lists (permission dialogs, question prompts) without also losing text selection or wheel scrolling.

I click in my terminal constantly — to place the cursor, to start a selection, to focus the window. In the fullscreen renderer, a stray click lands on whatever option row is drawn under the pointer and selects it. I've picked options by accident this way more than once. I don't want mouse-driven option selection at all; the keyboard is fine.

Why the existing settings don't cover it

Mouse handling appears to be a single three-state switch. From the 2.1.266 binary:

function h0() {
  if (a.CLAUDE_CODE_DISABLE_MOUSE !== void 0)
    return a.CLAUDE_CODE_DISABLE_MOUSE ? "off" : "full";
  if (a.CLAUDE_CODE_DISABLE_MOUSE_CLICKS !== void 0)
    return a.CLAUDE_CODE_DISABLE_MOUSE_CLICKS ? "scroll" : "full";
  return "full";
}
  • CLAUDE_CODE_DISABLE_MOUSE_CLICKS=1 → mode "scroll". The input loop then drops every left-button event:

``js
if (n.props.getMouseMode?.() === "scroll" && (x.button & 3) === 0) continue;
``

That kills option-clicking, but it also kills drag-to-select-text, because selection is driven by the same left-button events. Mouse reporting is still enabled, so the terminal won't do native selection either. Net result: no way to select text at all.

  • CLAUDE_CODE_DISABLE_MOUSE=1 → mode "off". Mouse reporting is disabled entirely, so native text selection works again — but the wheel no longer scrolls. Since fullscreen draws on the alternate screen there's no terminal scrollback to fall back on, so earlier output becomes unreachable.
  • The only configuration that gives all three (no option-clicking, text selection, scrollback) is giving up the fullscreen renderer entirely: "tui": "default".

I enumerated the mouse/screen-related env vars in the binary and these are all of them — none is finer-grained than the above:

CLAUDE_CODE_DISABLE_MOUSE, CLAUDE_CODE_DISABLE_MOUSE_CLICKS, CLAUDE_CODE_DISABLE_VIRTUAL_SCROLL, CLAUDE_CODE_DISABLE_ALTERNATE_SCREEN, CLAUDE_CODE_ALT_SCREEN_FULL_REPAINT, CLAUDE_CODE_SCROLL_SPEED, CLAUDE_CODE_HOVER_REST, CLAUDE_CODE_NATIVE_CURSOR

Repro

  1. Run with "tui": "fullscreen".
  2. Bring up any option list (permission dialog, question prompt).
  3. Click anywhere in the terminal — the click selects an option.
  4. Try to prevent just that: CLAUDE_CODE_DISABLE_MOUSE_CLICKS=1 also disables text selection; CLAUDE_CODE_DISABLE_MOUSE=1 also disables wheel scrolling with no scrollback available.

Proposal

Make option-clicking independently switchable — e.g. a CLAUDE_CODE_DISABLE_OPTION_CLICKS / settings equivalent, or a mouse mode that keeps wheel scrolling and drag-to-select but ignores clicks on interactive option rows. Ignoring a click on an option row is a much narrower thing than dropping all left-button events, and it's the only part of mouse support I actually want gone.

Environment

  • Claude Code 2.1.266 (native installer, ~/.local/share/claude/versions/2.1.266)
  • macOS 15 (Darwin 25.6.0), Apple Silicon
  • iTerm2
  • "tui": "fullscreen"

View original on GitHub ↗