Repository navigation
Fix the three input gaps of coder/ghostty-web#145 - #1
Merged
Merged
Conversation
- Wheel events go to the application as SGR mouse buttons 64/65 when it has mouse tracking on. Terminal.handleWheel used to prevent and stop every wheel event in the capture phase and send arrow keys on the alternate screen, so InputHandler's SGR path never ran. It now leaves the event to InputHandler when tracking is on; arrows stay the fallback without it. - Ctrl+V and Cmd+V are forwarded as 0x16 before the browser's paste event, for programs that read the clipboard themselves. Text paste is unchanged. - The cursor shape follows DECSCUSR at runtime: the render tick applies a changed style to the renderer, leaving the configured cursorStyle in place until the application asks.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Fixes the three input-handling gaps reported in coder#145, each with tests.
Terminal.handleWheelstopped every wheel event in the capture phase and sent arrow keys on the alternate screen, soInputHandler's SGR path never ran. It now leaves the event toInputHandlerwhen the application has tracking on; arrows stay the fallback without it.cursorStylestays until the application asks, so a configured bar or underline is not overridden by the WASM default on the first frame.Checked with
bun run fmt && bun run lint && bun run typecheck && bun test && bun run build:lib(532 tests). Verified in a browser against a Bubble Tea program with mouse reporting on: the wheel now scrolls the program's content.Each change is self-contained and PR-able upstream to coder/ghostty-web.