Support CJK (Chinese/Japanese/Korean) word boundary navigation with Option+Arrow keys on macOS
Resolved 💬 1 comment Opened Nov 6, 2025 by MarkShawn2020 Closed Dec 11, 2025
Environment
- Platform: macOS (iTerm2)
- Claude Code Version: Latest
- Terminal: iTerm2
Current Behavior
When typing Chinese (or other CJK languages) in Claude Code's input prompt:
Option + Left/Right Arrownavigates by ASCII words only- Chinese characters are not recognized as word boundaries
- Navigation treats entire Chinese sentence as one unit
Expected Behavior
Should match native iTerm2 behavior:
Option + Arrowshould jump between Chinese words/phrases- Respect CJK word boundaries (词边界)
- Consistent with macOS system-wide text navigation
Steps to Reproduce
- Type a mixed input:
hello 你好世界 world - Press
Option + Left Arrow - Cursor jumps over entire Chinese portion, not word-by-word
Technical Context
This appears to be a readline/input library limitation in recognizing CJK character boundaries. The underlying input handler may need:
- Unicode word boundary detection (UAX #29)
- CJK-aware tokenization
- Platform-specific word navigation mappings
Impact
Affects all CJK language users on macOS, making text editing cumbersome for non-ASCII input.
Related
- This works correctly in native iTerm2 shell
- Other modern terminals (VS Code, etc.) support CJK word navigation
This issue has 1 comment on GitHub. Read the full discussion on GitHub ↗