fix: parse SS3 cursor key sequences in read_key#283
Open
lovesegfault wants to merge 1 commit intoconsole-rs:mainfrom
Open
fix: parse SS3 cursor key sequences in read_key#283lovesegfault wants to merge 1 commit intoconsole-rs:mainfrom
lovesegfault wants to merge 1 commit intoconsole-rs:mainfrom
Conversation
Terminals in application cursor key mode (DECCKM) send SS3 sequences (ESC O A..F) instead of CSI (ESC [ A..F) for arrow/Home/End keys. zsh's line editor enables this mode via smkx and doesn't always reset it before running external commands, so programs using read_key() see arrows as UnknownEscSeq(['O']) with the trailing letter left unread. Add an ESC O branch mirroring the ESC [ branch for A/B/C/D/H/F. c.f. - https://vt100.net/docs/vt510-rm/DECCKM.html - https://www.zsh.org/mla/users/2016/msg00133.html - cli/cli#3071 - PowerShell/PowerShell#12268 - gui-cs/Terminal.Gui#418
lovesegfault
added a commit
to lovesegfault/rio-build
that referenced
this pull request
Mar 26, 2026
Replaces the hand-rolled ui::confirm with inquire and adds interactive fallbacks when required args are missing on a TTY. Scripts/CI keep the same errors — prompts only fire when stdin is a terminal. - Theme: ▸/✓/✗ glyphs, cyan/green/red matching indicatif, set once globally via set_global_render_config in ui::init - Prompt helpers: confirm, confirm_destroy (red ⚠), select, text — all suspend()-wrapped, TTY-gated, ESC→cancel/false - Fallbacks wired: k8s provider select, fuzz target picker, new-migration name (snake_case validator), k8s rollback picker (helm history -o json enriched with chart+image tag+friendly age) - k8s destroy: own ⚠ confirm with cluster name, tofu -auto-approve - DECCKM workaround: emit rmkx before prompts so arrows send CSI instead of SS3 — inquire's console backend can't parse SS3. Remove once console-rs/console#283 lands. - Deps: +inquire 0.9 (console backend), +jiff direct (friendly SpanPrinter for rollback ages), +bytesize (available for sizes)
Member
|
Thanks! I'm going to merge first, not sure if that has impact on the changes here? |
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.
Terminals in application cursor key mode (DECCKM) send SS3 sequences
(ESC O A..F) instead of CSI (ESC [ A..F) for arrow/Home/End keys.
zsh's line editor enables this mode via smkx and doesn't always reset
it before running external commands, so programs using read_key() see
arrows as UnknownEscSeq(['O']) with the trailing letter left unread.
Add an ESC O branch mirroring the ESC [ branch for A/B/C/D/H/F.
c.f.