[PR #15590] (WIP) Reset to alphabet input mode on <Escape> or <Enter> key #30679

Open
opened 2026-01-31 09:42:16 +00:00 by claunia · 0 comments
Owner

Original Pull Request: https://github.com/microsoft/terminal/pull/15590

State: closed
Merged: No


Summary of the Pull Request

When pressing <Escape> or <Enter> key, reset (CJK) keyboard IME input state to alphabet input mode.

References and Relevant Issues

Adds new feature:
#1304 Feature Request: IME mode after pressing Escape or Enter key in CJK input.

Detailed Description of the Pull Request / Additional comments

  • Use case: CJK user types shell command line using CJK input IME, or edits text file using Linux text editors like Vim (vi), nano or emacs editor.
  • Problem: After typing CJK words and phrases in CJK-script composition mode, user have to manually exit CJK input mode by pressing the composition key again and return to alphabet input mode. All shell commands and editor commands are alphabet/English word or key. So, CJK input after <Escape> or <Enter> key always causes command error. It is very error-prone and very, very annoying.
  • Solution: This PR solves such annoyance by switching IME input mode to alphabet input mode automatically upon pressing <Escape> or <Enter> key. This can be turned on/off at terminal/interaction setting pane.
  • Caveats: To type multi-line CJK phrases, user have to press CJK composition key after pressing each <Enter> key to go next line.
  • TODO: Setting toggle switch works as expected. Done.

Validation Steps Performed

This feature is widely supported in many open-source or commercial CJK-aware terminal emulator/SSH/Telnet client software or editors like Korean-localized xterm, hanterm, iPuTTY, XShell, and some MinTTY. It is such universally requested feature for Korean command line users.

PR Checklist

  • Closes Build Issues (#1304)
  • Tests added/passed
  • Documentation updated
    • If checked, please file a pull request on our docs repo and link it here: #xxx
  • Schema updated (if necessary)
**Original Pull Request:** https://github.com/microsoft/terminal/pull/15590 **State:** closed **Merged:** No --- ## Summary of the Pull Request When pressing \<Escape> or \<Enter> key, reset (CJK) keyboard IME input state to alphabet input mode. ## References and Relevant Issues Adds new feature: #1304 Feature Request: IME mode after pressing Escape or Enter key in CJK input. ## Detailed Description of the Pull Request / Additional comments * Use case: CJK user types shell command line using CJK input IME, or edits text file using Linux text editors like `Vim (vi)`, `nano` or `emacs` editor. * Problem: After typing CJK words and phrases in CJK-script composition mode, user have to manually exit CJK input mode by pressing the composition key again and return to alphabet input mode. All shell commands and editor commands are alphabet/English word or key. So, CJK input after \<Escape> or \<Enter> key always causes command error. It is very error-prone and very, very annoying. * Solution: This PR solves such annoyance by switching IME input mode to alphabet input mode automatically upon pressing \<Escape> or \<Enter> key. This can be turned on/off at terminal/interaction setting pane. * Caveats: To type multi-line CJK phrases, user have to press CJK composition key after pressing each \<Enter> key to go next line. * TODO: Setting toggle switch works as expected. Done. ## Validation Steps Performed This feature is widely supported in many open-source or commercial CJK-aware terminal emulator/SSH/Telnet client software or editors like Korean-localized `xterm`, `hanterm`, `iPuTTY`, `XShell`, and some `MinTTY`. It is such universally requested feature for Korean command line users. ## PR Checklist - [ ] Closes #1304 - [ ] Tests added/passed - [ ] Documentation updated - If checked, please file a pull request on [our docs repo](https://github.com/MicrosoftDocs/terminal) and link it here: #xxx - [ ] Schema updated (if necessary)
claunia added the pull-request label 2026-01-31 09:42:16 +00:00
Sign in to join this conversation.
No Label pull-request
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/terminal#30679