Repository navigation
macOS: fix non control keys are not working for AppleScript - #13205
Merged
Merged
Conversation
Contributor
|
I've been daily driving Ghostty with that — couldn't find any problems with it. |
Member
Author
You're welcome to open a pr to the website once this is merged. |
bo2themax
force-pushed
the
push-0f19080e
branch
3 times, most recently
from
August 10, 2026 10:08
5f317f8 to
07646de
Compare
bo2themax
force-pushed
the
push-0f19080e
branch
2 times, most recently
from
August 14, 2026 06:59
071404f to
6b3ea38
Compare
bo2themax
force-pushed
the
push-0f19080e
branch
2 times, most recently
from
August 24, 2026 07:43
a175da2 to
954b901
Compare
jparise
reviewed
Aug 24, 2026
jparise
left a comment
Contributor
There was a problem hiding this comment.
We learned a few things from #13888 that could be helpful here:
- The flaky tests probably needed to be
@MainActor. The AppKit key translation routines want to run on the main thread. - We could reuse/refactor the new
NSEventcreation code inKeyboardLayoutinstead of duplicating it. - Set
consumedModsfor Shift/Option translations to match real key events. - Avoid synthetic text on releases/control keys: real
keyActionfilters C0 text and sends key-up without text. This PR currently bypasses that, potentially changing Enter/Tab and Kitty protocol behavior.
Member
Author
Thanks, will take a look at these points next time I rebase this. |
bo2themax
marked this pull request as draft
August 24, 2026 13:38
This was referenced Aug 25, 2026
mitchellh
added a commit
that referenced
this pull request
Aug 25, 2026
Partial changes for #13205, known issues are marked as warnings. ### AI Disclosure Claude generated these tests from linked pr, I cherrypicked and reviewed myself.
bo2themax
marked this pull request as ready for review
August 25, 2026 13:21
bo2themax
force-pushed
the
push-0f19080e
branch
from
August 25, 2026 13:23
954b901 to
2e8d1c8
Compare
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
bo2themax
force-pushed
the
push-0f19080e
branch
from
August 25, 2026 16:06
2e8d1c8 to
6229d4e
Compare
jparise
approved these changes
Aug 27, 2026
Contributor
|
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.
send keyonly works for control keys likeentercurrently; this adds (fixes) the support for other keys listed as available. Found by @paaloeye in #13180The core of this fix is relying on
UCKeyTranslateto get the corresponding character and code point from a key code usingKeyboardLayout.character(for:modifiers:).ScriptKeyEventCommand now respects
macos-option-as-alt, and attachtext,unshifted_codepointandconsumed_modsunder the same condition as a manual input events like inperformKeyEquivalentandlocalEventKeyDown.AI Disclosure
Claude did the heavy lifting, I reviewed and rephrased some of the comments it generated. And ofc reviewed and tested myself.