Commit graph

10 commits

Author SHA1 Message Date
Hiroki Kajiwara
a395e8c343
fix: prevent Japanese IME confirmation Enter from executing command (#2075)
* fix: prevent Japanese IME confirmation Enter from executing command

Korean IME commits a syllable and executes on a single Enter, but
Japanese/Chinese IME use Enter only to confirm conversion — a second
Enter is needed to execute. Restrict the extra Return forwarding in
shouldSendCommittedIMEConfirmKey to Korean input sources only.

* refactor: use case-insensitive check for Korean input source ID
2026-03-24 22:24:13 -07:00
Lawrence Chen
b64fb301c1
fix(terminal): execute Return after Korean IME commit (#1671)
* test(terminal): cover Return after Korean IME commit

* fix(terminal): execute Return after Korean IME commit

---------

Co-authored-by: Lawrence Chen <lawrencecchen@users.noreply.github.com>
2026-03-17 22:07:45 -07:00
Austin Wang
392e98126a
Fix Option+Delete word delete on AZERTY (#1640) 2026-03-17 17:45:30 -07:00
Lawrence Chen
98f5553335
Fix macOS dictation NSTextInputClient conformance (#1410)
* Add dictation text input regression tests

* Fix dictation text input client conformance

* Fix dictation caret rect anchoring

---------

Co-authored-by: Lawrence Chen <lawrencecchen@users.noreply.github.com>
2026-03-13 18:14:02 -07:00
Qian Wan
6f210dd2c7
Fix voice dictation text insertion path in GhosttyNSView. (#857)
* Fix voice dictation text insertion path in GhosttyNSView.

* Fix AX selected text decoding to use explicit length
2026-03-04 17:25:39 -08:00
Austin Wang
bdfcc74df3
Fix Shift+backquote input regression in Ghostty key path (#815) 2026-03-03 15:57:36 -08:00
Austin Wang
aa8fc7232a
Fix Shift+Space IME toggle inserting space (#641) (#670) 2026-02-28 21:12:17 -08:00
Cheul
8968f787ca
Fix Codex non-empty composer space tap starting transcription in cmux (#540)
* Fix space hold-to-talk by normalizing keyUp event metadata

* Add regression test for synthetic Space key release metadata
2026-02-27 03:42:09 -08:00
Lawrence Chen
ba818deb44 Fix IME firstRect preedit anchor sizing (https://github.com/manaflow-ai/cmux/issues/265) 2026-02-21 03:16:33 -08:00
Lawrence Chen
463c6baabb
Fix CJK IME input (Korean, Chinese, Japanese) (#125)
* Fix CJK IME input not working (#118)

CJK (Korean, Japanese, Chinese) IME input was completely broken because
cmux never forwarded preedit/composition state to Ghostty's libghostty.

Root causes and fixes:

1. Missing preedit sync: Added syncPreedit() that calls
   ghostty_surface_preedit() to notify Ghostty about IME composition
   text. Called from setMarkedText, unmarkText, and after
   interpretKeyEvents in keyDown.

2. Wrong composing flag: The composing flag on key events now correctly
   accounts for when composition just ended (markedTextBefore was true
   but markedText is now empty), preventing spurious deletions when
   canceling composition.

3. Event interception during IME: Added early exits in
   performKeyEquivalent, the NSWindow swizzle, and the local event
   monitor (handleCustomShortcut) to avoid stealing key events while
   IME has active marked text.

4. IME popup positioning: firstRect(forCharacterRange:) now uses
   ghostty_surface_ime_point() for accurate cursor-relative positioning
   of the IME candidate window.

* Add regression tests for CJK IME composition (#118)

31 tests covering Korean, Japanese, and Chinese IME input scenarios:

- Korean jamo combining: ㅎ -> 하 -> 한 composition lifecycle
- Chinese pinyin: multi-letter marked text and candidate selection
- Japanese hiragana-to-kanji: romaji -> hiragana -> kanji conversion
- insertText correctly commits composed text and clears marked state
- unmarkText properly clears composition state (idempotent)
- performKeyEquivalent returns false during active composition for
  all key types (plain, shift, space, return, escape)
- Shortcut bypass: hasMarkedText gates the handleCustomShortcut bypass
- Multi-syllable sequences, backspace correction, and rapid transitions
- keyTextAccumulator lifecycle tests

Also adds #if DEBUG test accessors for keyTextAccumulator on
GhosttyNSView to enable unit testing the accumulator path.
2026-02-19 22:37:41 -08:00