Fix meta+enter/tab/escape sending literal key names in legacy encoding#9514
Fix meta+enter/tab/escape sending literal key names in legacy encoding#9514oliver-ni wants to merge 1 commit intowarpdotdev:masterfrom
Conversation
|
Thank you for your pull request and welcome to our community. We require contributors to sign our Contributor License Agreement, and we don't seem to have the users @oliver-ni on file. In order for us to review and merge your code, each contributor must visit https://cla.warp.dev to read and agree to our CLA. Once you have done so, please comment |
|
I'm starting a first review of this pull request. I completed the review and posted feedback on this pull request. Comment I'm re-reviewing this pull request in response to a review request. You can view the conversation on Warp. I reviewed this pull request and requested human review from: @vorporeal. Comment Powered by Oz |
|
@cla-bot check |
|
The cla-bot has been summoned, and re-checked this pull request! |
meta_keystroke_to_escape_sequence falls back to sending the key name as literal ASCII bytes when the key isn't in map_special_key_to_bytes. This caused meta+enter to send ESC+"enter" (6 bytes) instead of ESC+CR, and similarly for tab, escape, and numpadenter. Add the missing entries to map_special_key_to_bytes: - enter/numpadenter → CR (\r) - tab → HT (\t) - escape → ESC (\x1b) Generated with [Devin](https://devin.ai/terminal)
6b6fd5a to
3e0b4cb
Compare
There was a problem hiding this comment.
Overview
This PR updates the legacy meta-key path so meta/alt-modified Enter, NumpadEnter, Tab, and Escape map to ESC-prefixed control bytes instead of literal key-name strings. The code change in crates/warp_terminal/src/model/escape_sequences.rs is consistent with the existing legacy fallback behavior.
Concerns
- The diff also includes unrelated bootstrap/reference fixture changes and opaque Windows
.pdbbinary changes with patches unavailable. These artifacts are unrelated to the key-encoding fix and cannot be meaningfully reviewed in this PR; remove them or split/regenerate them in a dedicated, explained change.
Verdict
Found: 0 critical, 1 important, 0 suggestions
Request changes
Comment /oz-review on this pull request to retrigger a review (up to 3 times on the same pull request).
Powered by Oz
|
/oz-review |
There was a problem hiding this comment.
Overview
This PR updates legacy meta/alt key encoding so Enter, NumpadEnter, Tab, and Escape map to their control-byte representations before being prefixed with ESC, avoiding the previous fallback to literal key names.
Concerns
- No blocking correctness or security concerns found in the changed lines.
Verdict
Found: 0 critical, 0 important, 0 suggestions
Approve
Comment /oz-review on this pull request to retrigger a review (up to 3 times on the same pull request).
Powered by Oz
Fixes #9517
Description
Meta+enter (among others) was sending the ESC plus the literal string
enterinstead of anything reasonable! This has been bothering me for ages and is becausemeta_keystroke_to_escape_sequencefalls back to sending the key name as literal ASCII bytes when the key isn't in map_special_key_to_bytes.Add the missing entries to map_special_key_to_bytes:
Testing
Didn't add tests as I think they'd just be repeating the implementation.
Server API dependencies
Agent Mode
Changelog Entries for Stable
CHANGELOG-BUG-FIX: Fixed Option+Enter, Option+Tab, and Option+Escape sending literal key names instead of correct escape sequences