Skip to content

fix(tui): restore wheel scroll on macOS in tuiapp_v2#361

Merged
lsdefine merged 1 commit into
lsdefine:mainfrom
nianyucatfish:fix/v2-macos-wheel
May 13, 2026
Merged

fix(tui): restore wheel scroll on macOS in tuiapp_v2#361
lsdefine merged 1 commit into
lsdefine:mainfrom
nianyucatfish:fix/v2-macos-wheel

Conversation

@nianyucatfish

Copy link
Copy Markdown
Collaborator

PR #360 disabled Textual mouse support on darwin (run(mouse=False)) to keep terminal-native selection working. Side effect: ?1006 SGR mouse was never enabled, while macOS Terminal.app / iTerm2 default "?1007" (alternate scroll mode) translated wheel events into Up/Down keys — which then triggered the newly added input-history navigation.

Re-enable mouse globally and explicitly disable "?1007" on mount so wheel events flow through the SGR channel without spawning duplicate arrow keys. Keyboard Up/Down history navigation is unaffected. The "?1007" disable is a no-op on Linux / Windows Terminal where it defaults off.

PR lsdefine#360 disabled Textual mouse support on darwin (run(mouse=False)) to
keep terminal-native selection working. Side effect: ?1006 SGR mouse was
never enabled, while macOS Terminal.app / iTerm2 default ?1007 (alternate
scroll mode) translated wheel events into Up/Down keys — which then
triggered the newly added input-history navigation.

Re-enable mouse globally and explicitly disable ?1007 on mount so wheel
events flow through the SGR channel without spawning duplicate arrow
keys. Keyboard Up/Down history navigation is unaffected. The ?1007
disable is a no-op on Linux / Windows Terminal where it defaults off.
@lsdefine
lsdefine merged commit 0accd0e into lsdefine:main May 13, 2026
RocketLi pushed a commit to RocketLi/GenericAgent that referenced this pull request May 18, 2026
PR lsdefine#360 disabled Textual mouse support on darwin (run(mouse=False)) to
keep terminal-native selection working. Side effect: ?1006 SGR mouse was
never enabled, while macOS Terminal.app / iTerm2 default ?1007 (alternate
scroll mode) translated wheel events into Up/Down keys — which then
triggered the newly added input-history navigation.

Re-enable mouse globally and explicitly disable ?1007 on mount so wheel
events flow through the SGR channel without spawning duplicate arrow
keys. Keyboard Up/Down history navigation is unaffected. The ?1007
disable is a no-op on Linux / Windows Terminal where it defaults off.
lsdefine pushed a commit that referenced this pull request Jul 23, 2026
PR #360 disabled Textual mouse support on darwin (run(mouse=False)) to
keep terminal-native selection working. Side effect: ?1006 SGR mouse was
never enabled, while macOS Terminal.app / iTerm2 default ?1007 (alternate
scroll mode) translated wheel events into Up/Down keys — which then
triggered the newly added input-history navigation.

Re-enable mouse globally and explicitly disable ?1007 on mount so wheel
events flow through the SGR channel without spawning duplicate arrow
keys. Keyboard Up/Down history navigation is unaffected. The ?1007
disable is a no-op on Linux / Windows Terminal where it defaults off.
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.

2 participants