fix(grove): fix Korean Hangul IME composition with Shift in terminal#54
Merged
bang9 merged 2 commits intobang9:mainfrom Mar 28, 2026
Merged
fix(grove): fix Korean Hangul IME composition with Shift in terminal#54bang9 merged 2 commits intobang9:mainfrom
bang9 merged 2 commits intobang9:mainfrom
Conversation
…locale - Reject bare "UTF-8" as unusable locale in preferred_utf8_locale(), falling through to "C.UTF-8" (LANG=UTF-8 is not a valid POSIX locale and causes zsh/tmux to mishandle multi-byte input) - Add -u flag to tmux new-session and attach-session to force UTF-8 - Propagate LANG and LC_CTYPE into tmux session environment so the shell inside tmux gets a proper UTF-8 locale
…minal The xterm.js WKWebView patch (PR #5704) flushes pending IME composition on any non-229 keydown, including modifier keys. This causes Shift- required Korean characters (ㅆ, ㅖ, ㅃ, etc.) to break composition. Add modifier key exceptions (Shift, Ctrl, Alt, CapsLock, Meta) to the _wkFlush guard in both xterm.js and xterm.mjs entry points.
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.
Summary
UTF-8rejected,tmux -uflag added,LANG/LC_CTYPEpropagated)Root cause
The xterm.js WKWebView patch (xtermjs/xterm.js#5704, not yet merged upstream) flushes pending IME composition on any non-229 keydown in
_keyDown:This includes modifier keys (Shift=16, Ctrl=17, Alt=18, etc.), which prematurely sends the composing text to the PTY and breaks composition for Shift-required Korean characters.
Fix
Add modifier key exceptions to the
_wkFlushguard in bothxterm.jsandxterm.mjsentry points:Changed files
grove/grove-core/src/pty.rs— locale fix + tmux UTF-8 flagsgrove/patches/@xterm__xterm.patch— modifier key exception in xterm.js WK IME flushgrove/pnpm-lock.yaml— patch hash updateTest plan
pnpm install && pnpm tauri devbuilds and runs correctly