Repository navigation
Description
Summary
On the desktop terminal (xterm.js), pressing Enter while a Hangul (Korean) syllable is still being composed causes the trailing syllable to be pushed onto a new line instead of being committed inline before the newline. This looks like a missing isComposing / keyCode === 229 guard on the terminal's Enter handling — the same class of bug already fixed for other input surfaces in #6980 (rename inputs) and #742 (workflow popup), but still present in the desktop terminal itself.
This is desktop-specific and distinct from the mobile Korean IME issues (#7183 / #7182 / #7000), which live in mobile/src/terminal/* (React Native). Here the affected surface is the xterm.js terminal in the desktop app.
Environment
- Orca: v1.4.131 (desktop, macOS)
- OS: macOS (Darwin 25.5.0), Apple Silicon
- IME: 2-Set Korean (두벌식) — the default macOS Korean input source
- Surface: desktop terminal pane (xterm.js). English/ASCII input is unaffected.
Steps to reproduce
- Switch the macOS input source to Korean (2-Set / 두벌식).
- Focus a terminal pane in the desktop app.
- Type a few Korean syllables, e.g.
하 하 하, so the last syllable is still in IME composition (marked/underlined, not yet committed). - Press Enter.
Expected
The full composed text is committed inline, then a single newline is sent — i.e. Enter should first flush the pending composition (compositionend), then submit. The trailing syllable stays on the same line as the rest of the command.
Actual
The trailing syllable is separated onto a new line. Visually:
> 하 하
하▮ ← last syllable leaked onto the next line after Enter
The \r (newline) appears to be sent while the IME composition is still active, so the compositionend commit of the last syllable races/lands after the newline instead of before it.
Root cause hypothesis
The terminal's key handling does not suppress/defer Enter while KeyboardEvent.isComposing is true (equivalently keyCode === 229 during composition). It should not emit the carriage return until the pending composition has been committed. This is the identical failure mode described in:
- [Bug]: Worktree/tab/window rename inputs commit on Japanese IME Enter confirmation (missing isComposing guard) #6980 — "rename inputs commit on Japanese IME Enter confirmation (missing isComposing guard)"
- [Bug]: Workflow creation popup submits on Japanese IME Enter confirmation #742 — "Workflow creation popup submits on Japanese IME Enter confirmation"
Those were fixed by guarding Enter on isComposing; the desktop terminal path appears to have been missed. (Also related in spirit: #6905 Vietnamese IME in terminal.)
Workaround (for other users hitting this)
Commit the composition before pressing Enter using anything that isn't Enter — e.g. finish typing, tap 한/영 (Caps Lock) to switch the input source to English (which commits the pending syllable), then press Enter. Enter then fires with no active composition and submits cleanly.
Notes
- A screenshot reproducing the
> 하 하/하split is available and can be attached on request. - Repro is 100% consistent whenever the final character before Enter is an uncommitted Hangul syllable.
Activity
test(terminal): add Korean IME committing-Enter e2e regression spec
sanghunka commentedon Jul 16, 2026
Couldn't reproduce on my end(same env).
It actually only happens when I press Shift+Enter instead of just Enter.
@baekstrong Was it Shift+Enter or just Enter that you hit?
baekstrong commentedon Jul 16, 2026
I pressed shift+enter to add a line break.
can you fix this??
sanghunka commentedon Jul 16, 2026
Ah, then this issue duplicates #8578.
It's being addressed there
nwparker commentedon Jul 27, 2026
Screenshot / short recording needed
Desktop terminal drops the last Hangul syllable onto a new line on Enter (
isComposingmissing). Visual evidence:Include macOS version, keyboard input source (2-Set Korean / etc.), and Orca version.
nwparker commentedon Jul 27, 2026
Attempted repro — cannot_repro
Tried
xterm-bypass-policy.ts,terminal-ime-*, custom key handler inuse-terminal-pane-lifecycle.ts).Enteris inTERMINAL_IME_OWNED_KEYSand is suppressed whencompositionActive/isComposingis true.Result
Could not produce conclusive UI evidence of the Hangul Enter split on this host. Policy-level code appears to suppress Enter during composition; if the bug still reproduces, it likely lives in xterm CompositionHelper commit ordering rather than a missing
isComposingguard on Orca’s custom handler. Needs a manual Hangul IME pass on macOS desktop.ethznn commentedon Jul 29, 2026
I can still reproduce this on Orca 1.4.156.
While the final
자in마지막 글자is still under active IME composition, pressing Shift+Enter produces:In string form:
This suggests the issue is in Orca's terminal IME/Shift+Enter handling rather than in a specific CLI agent.
This also appears to match #10343.
Screen.Recording.2026-07-29.at.1.38.06.PM.mov
Here is a short recording showing the reproduction in Orca 1.4.156 and the same input working correctly in iTerm2.
The final
자is still under active Korean IME composition when Shift+Enter is pressed.I hope this helps with reproducing and diagnosing the issue. Thanks for looking into it!
AmethystLiang commentedon Aug 2, 2026
Thanks for reporting. Will looking into fixing it.
tonite31 commentedon Aug 11, 2026
Re-checked this on current-era code, since the confirmed repro above predates the recent IME churn (the composition-ownership change #13128 and its revert #13282).
Setup: macOS built-in Korean 2-Set, Claude Code composer in the integrated terminal, on a build tracking upstream
mainate172a5164(2026-08-08; terminal/IME input path is unmodified upstream code). Ran the exact sequence from the confirmed repro — type마지막 글자, keep the final자in active composition, press Shift+Enter.Result: no split. The line stays intact and the newline lands after it — not the
마지막 글/ blank line /자shape reproduced on 1.4.156 above.So this looks fixed somewhere between 1.4.156 and
e172a5164; I can't bisect which change did it from here. If anyone still hits it, worth stating the exact version — and if it reproduces on ≥ 1.4.177, that would separate it from the pre-revert composition code. Same symptom family as #10343, which this result covers too.nwparker commentedon Aug 15, 2026
Fixed on main — same root cause as #10343.
Your diagnosis was right: the newline was being sent while the syllable was still composing. Terminal shortcuts now wait for the composition to commit before their bytes go out (
fe6f929c6e3, plus8af6876510d/ca9562ceee7).Your original repro was on 1.4.156, which predates the fix, and you re-tested clean afterwards. Thanks for both.
Reopen with a build number if it comes back.