Skip to content

[BUG] Mouse wheel interpreted as ↑/↓ arrow keys instead of scrolling (WSL2/Ubuntu) #39

Description

@powyncify

Summary
In Agent View on WSL2/Ubuntu, mouse wheel movements are misinterpreted as arrow Up/Down keystrokes in the input line instead of scrolling the output. This has been carefully isolated to Agent View specifically, both plain Claude Code and Claude Code inside tmux scroll correctly with the mouse wheel on the same machine.


Environment

  • OS: Ubuntu (WSL2) on Windows
  • Terminal emulator: (Windows Terminal)
  • Agent View version: latest
  • tmux version (tmux -V): 3.4

Steps to Reproduce

  1. Open WSL2 Ubuntu (inside or outside tmux — both exhibit the same behavior in Agent View).
  2. Launch Agent View and start a Claude Code session that produces output longer than one screen.
  3. Attempt to scroll up using the mouse wheel.
  4. Observe: instead of scrolling output, the cursor moves up/down in the input line — as if ↑/↓ arrow keys were pressed.
  5. Try Page Up / Page Down — no effect.

What Should Happen
Mouse wheel scroll up/down should scroll through the Agent View output history, consistent with how scrolling works in regular Claude Code and Claude Code inside tmux on the same system.

What Actually Happens
Mouse wheel events are consumed by Agent View and interpreted as arrow Up/Down keystrokes, navigating input history instead of scrolling output. Page Up/Down have no effect.


Isolation / Diagnostic Evidence
Carefully isolated across three scenarios on the same WSL2 machine:

Scenario Mouse Wheel Page Up/Down
Claude Code (regular), no tmux ✅ Scrolls output ❌ No effect
Claude Code (regular), inside tmux ✅ Scrolls output ❌ No effect
Agent View (inside or outside tmux) Arrow ↑/↓ in input ❌ No effect

Additional checks ruled out as root causes:

  • set -g mouse on was already present in ~/.tmux.conf
  • history-limit raised to 100000 — no effect
  • Behavior is identical inside and outside tmux → tmux is not the root cause
  • Outside Agent View, scrolling works → WSL is not the root cause

The bug is specific to how Agent View handles mouse wheel events in its TUI.


Workaround
From inside tmux only: Ctrl+B] to enter copy mode → scroll → q to exit. Not available at all outside tmux.


Impact
Agent View output cannot be reviewed during or after a task on WSL2 without the tmux copy-mode workaround. This significantly limits usability for long-running sessions where reviewing intermediate output is essential.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions