mirror-ghostty/macos
Akinori Musha d60a16c146 macos: avoid replaying keys that commit preedit
Refs #10460
Related: #12518

When an input method commits all or part of marked text during keyDown,
AppKit returns the committed text through insertText. Treat that as
text committed by the input method instead of replaying the original key
event to the terminal.

Previously this path only handled arrow-key commits specially. A
control-key shortcut that commits preedit text could still be encoded as
the original control input after composition, such as ctrl+j becoming LF.

Send committed preedit text as a text-only event for any key that causes
the commit. Only replay arrow navigation keys that the existing Korean
IME handling expects, and keep plain left-arrow suppressed because AppKit
already leaves the caret in place.

AI usage: OpenAI Codex helped investigate, implement, test, and refine
this change. I reviewed and tested the resulting code.
2026-05-01 23:18:42 +09:00
..
Assets.xcassets macos: Ghostty Icon Update for macOS Tahoe 2025-06-21 12:34:49 -07:00
Ghostty.xcodeproj chore: remove Ghostty.xctestplan in project tree. 2026-04-29 19:24:03 +02:00
GhosttyUITests test: always use temporary config when running ui tests 2026-04-26 13:53:36 +02:00
Sources macos: avoid replaying keys that commit preedit 2026-05-01 23:18:42 +09:00
Tests macos: suppress control-char input while composing 2026-04-29 22:50:35 +09:00
.gitignore build: LipoStep 2023-02-19 10:44:53 -08:00
.swiftlint.yml macos: swiftlint 'multiple_closures_with_trailing_closure' rule 2026-02-21 10:17:15 -08:00
AGENTS.md macos: add macos-applescript config 2026-03-06 15:04:20 -08:00
Ghostty-Info.plist macos: disable Tahoe one-time codes 2026-03-10 19:41:22 -07:00
Ghostty.entitlements macos: add entitlements for basically everything so macos asks 2023-11-23 09:00:20 -08:00
Ghostty.sdef macos: add pid and tty properties to AppleScript terminal class 2026-04-20 15:16:03 +02:00
Ghostty.xctestplan test: add test plan and override default config when running tests 2026-04-26 14:49:20 +02:00
GhosttyDebug.entitlements macos: add Sparkle via Swift PM 2023-12-18 19:09:38 -08:00
GhosttyReleaseLocal.entitlements fix(macos): ReleaseLocal build configuration with "Library Validation" disabled 2023-12-20 16:54:58 -05:00
build.nu macos: add build script, update AGENTS.md, skip UI tests 2026-03-05 19:55:50 -08:00