Repository navigation
Fix legacy Alt keys and Windows Ctrl+Z input for 1.29.1 - #88
Merged
Merged
Conversation
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.
The Icod.Widgets menu gallery exposed two transport problems: legacy Alt+F was decoded as Escape followed by ordinary text, and Windows console stream reads could interpret Ctrl+Z as EOF even in raw mode. That prevented menu activation and exited the editor instead of undoing.
This patch decodes legacy Alt characters within the existing bounded escape window while preserving control-family recovery. Windows process input now uses an owned
ReadConsoleWhandle, preserving Ctrl+C, Ctrl+Z, and Unicode, converting UTF-16 incrementally to UTF-8, and completing canceled reads before closing the handle. Process console encodings are unchanged.The application-shortcut API is explicit and cross-platform: open the session with
TerminalSessionOptions.InputMode = TerminalInputMode.Raw, then consume Ctrl+C and Ctrl+Z throughReadEventAsync(...)asTerminalKey.Characterevents with the Control modifier and charactersCandZ.CBreakdeliberately preserves POSIXSIGINT/SIGTSTPand Windows processed-input behavior. No separate signal-interception API is required.Version is 1.29.1. No public API or production dependency changes. README remains capability-focused and records the raw-control-key contract plus owned Windows console path. The permanent input guide defines raw versus cbreak behavior, legacy Alt decoding, and Windows handle ownership. The Rich Input sample deliberately uses raw mode and walks through Alt+F, Ctrl+C, and Ctrl+Z. CHANGELOG and curated release notes carry the complete release history.
Validation:
Windows/Linux/macOS runtime and integration jobs, package contract shards, package artifacts, native Windows input, and compatibility sample acceptance all pass in CI run 38811982909 on
ce56b3bed42586972896da849fa8439e23465fec.Companion to uniblab/Icod.Widgets#12. Publish this patch before updating the Widgets/DCurses dependency chain and repeating the owner Windows gallery test.
Do not merge or publish automatically.