Files
ghostty/macos
Mitchell Hashimoto e9ad4b1d63 macOS: fix non control keys are not working for AppleScript (#13205)
`send key` only works for control keys like `enter` currently; this adds
(fixes) the support for other keys listed as available. Found by
@paaloeye in #13180

The core of this fix is relying on `UCKeyTranslate` to get the
corresponding character and code point from a key code using
`KeyboardLayout.character(for:modifiers:)`.

ScriptKeyEventCommand now respects `macos-option-as-alt`, and attach
`text`, `unshifted_codepoint` and `consumed_mods` under the same
condition as a manual input events like in `performKeyEquivalent` and
`localEventKeyDown`.

## AI Disclosure

Claude did the heavy lifting, I reviewed and rephrased some of the
comments it generated. And ofc reviewed and tested myself.
2026-08-27 09:33:24 -07:00
..
2023-02-19 10:44:53 -08:00
2026-03-06 15:04:20 -08:00