Repository navigation
Conversation
German Option+L produces @, but the terminal forwarded Option as Alt into the non-macOS libghostty-vt build. DEC 1036 then sent ESC @, which readline treats as set-mark, so the character never appeared. The same path dropped the rest of the Option layer. Consume a lone Option on macOS, and Shift when it helped produce the character, so the encoder writes the composed character. Ctrl, Meta, and Option+arrow stay chords. Fixes pingdotgg#13046
Owner
Author
|
Superseded by upstream READY PR on pingdotgg/t3code (same branch). |
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.
What Changed
On macOS, a lone Option that produces a character is marked consumed (Shift too, when it participated) before libghostty-vt encodes the key. Ctrl, Meta, and Option+arrow are unchanged.
Why
Fixes pingdotgg#13046. On a German Mac layout
@is Option+L. The desktop terminal (and the web app, which shares this Ghostty surface) always forwarded Option as Alt. The vendored encoder is not a macOS build, so Ghostty'smacos-option-as-alt = falsepath never runs, and DEC 1036 (alt_esc_prefix) turns Option+L intoESC @. At a bash/zsh prompt that is set-mark, so nothing appears. The same encoding drops the rest of that Option layer (€,~,[]{}|,\).Consuming Option makes the encoder write the composed character, which is Terminal.app with "Use Option as Meta key" off and Ghostty's default. Option+letter meta chords such as Option+B, which today become
ESC bvia the unshifted-codepoint fallback, will type the composed character instead.Checklist