Mouse wheel scroll (and arrow keys) trigger prompt-history recall instead of scrolling transcript, in JetBrains (PhpStorm) integrated terminal

Open 💬 0 comments Opened Jul 14, 2026 by anik666777

Title

Mouse wheel scroll (and arrow keys) trigger prompt-history recall instead of scrolling transcript, in JetBrains (PhpStorm) integrated terminal

Environment

  • Claude Code version: 2.1.209 (confirmed latest via claude update)
  • Terminal: PhpStorm 2026, "Reworked 2025" terminal engine
  • OS: macOS (Darwin 24.2.0)
  • settings.json: clean — no CLAUDE_CODE_DISABLE_MOUSE, no CLAUDE_CODE_DISABLE_ALTERNATE_SCREEN; CLAUDE_CODE_NO_FLICKER=1 (equivalent to "tui": "fullscreen") is set

Description

When running Claude Code inside the PhpStorm integrated terminal, scrolling the mouse wheel over the conversation transcript does not scroll the transcript. Instead, it cycles through the user's own past submitted prompts (input history), as if ↑/↓ arrow keys were pressed while the input box is focused.

Diagnosis performed

  1. Initially suspected PhpStorm terminal config. Found and fixed Settings → Tools → Terminal → Application Settings → "Mouse reporting" was unchecked — enabled it, restarted the session. Symptom persisted.
  2. Verified at the raw terminal level that mouse events are now sent correctly, independent of Claude Code:

``
printf '\e[?1000h\e[?1006h'
cat -v
`
Scrolling the wheel while this was running produced correct SGR mouse sequences (e.g.
^[[<64;12;5M), NOT arrow-key escape codes (^[[A / ^[[B`). This confirms the terminal is emitting proper SGR mouse-reporting events.

  1. Despite the terminal sending correct mouse events, scrolling inside Claude Code still cycles prompt history.
  2. Tested physical ↑/↓ arrow keys (no mouse) while the input box was focused — they also cycle prompt history, identically to mouse wheel. This suggests Claude Code either translates incoming mouse-wheel events into synthetic arrow-key input, or has no dedicated "scroll transcript" action distinct from "arrow keys navigate input history" while the input box is focused.

Expected behavior

Scrolling the mouse wheel over the transcript area should scroll the transcript, not cycle through prompt history — at least when the wheel event originates over the transcript rather than the input box.

Actual behavior

Both mouse wheel and arrow keys, while the input box has focus, always trigger prompt-history recall — there appears to be no way to scroll the transcript by wheel/arrows in this terminal, only via [/} (jump between prompts) and Ctrl+E (expand collapsed content).

Workaround

Running claude in a native terminal (iTerm2 / Terminal.app) instead of PhpStorm's integrated terminal works correctly — the terminal's own scrollback handles it natively.

View original on GitHub ↗