Skip to content

[FEATURE]: Bypass or auto-switch IME (Input Method) when using the "leader" key #37167

Description

@miaonai

Feature hasn't been suggested before.

  • I have verified this feature I'm about to request hasn't been suggested before.

Describe the enhancement you want to request

Description

Currently, when using OpenCode with an active Input Method Editor (IME) like Microsoft Pinyin (Chinese), the leader key (default ctrl+x) workflow is interrupted.

If I press the leader key and then press a letter key, the letter is intercepted by the IME, which brings up the candidate window instead of triggering the corresponding OpenCode shortcut. To make it work, I either have to press Enter to commit the raw letter through the IME, or manually switch my IME to English mode before initiating the leader key sequence.

Proposed Enhancement

It would be greatly appreciated if OpenCode could handle this more seamlessly for non-English users. There are two potential approaches:

  1. Bypass the IME: When the leader key state is active, capture the raw keystrokes directly, bypassing the system's IME interception entirely.
  2. Auto-switch IME: Automatically switch the system input method to English/Alphanumeric mode upon pressing the leader key, and automatically restore the previous IME state once the command is executed or canceled.

Benefits

  • Smoother Workflow: Users won't have to constantly monitor or manually toggle their IME status just to use shortcuts.
  • Better User Experience: Prevents frustrating moments where shortcuts fail because the user forgot to switch to English, making OpenCode feel much more responsive and native.

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Fields

No fields configured for issues without a type.

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions