You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
[Bug] Keyboard shortcuts don't work when Chinese IME is active #24192
All keyboard shortcuts stop working when using a Chinese Input Method Editor (IME). The shortcuts only work after switching to an English keyboard layout (Win+Space).
This affects all shortcuts in the OpenCode desktop application on Windows.
To Reproduce
Steps to reproduce the behavior:
Open OpenCode desktop app on Windows
Switch to Chinese IME (e.g., Microsoft Pinyin, Sogou, or any CJK input method)
Try any keyboard shortcut (e.g., Ctrl+K, Ctrl+Enter, etc.)
Observe that shortcuts are not triggered
Expected behavior
Keyboard shortcuts should work regardless of the active input method, similar to how VS Code, Slack, and other Electron/Tauri apps handle this.
Environment
OS: Windows 11
OpenCode Version: 1.14.23
Input Method: Chinese IME (Microsoft Pinyin / Sogou / etc.)
App Type: Desktop (BETA)
Additional context
This is a known issue in web-based desktop apps. The root cause is that IME composition events (compositionstart/compositionend) intercept keyboard events before the application's shortcut handlers can process them.
Technical analysis
The fix typically involves checking event.isComposing or event.keyCode === 229 in keyboard event handlers:
\\ ypescript
// Suggested fix:
document.addEventListener('keydown', (e) => {
// Skip if IME composition is in progress
if (e.isComposing || e.keyCode === 229) return;
Additionally, compositionend should use setTimeout(0) to delay resetting the composing state, to handle the race condition where compositionend and keydown fire in the same event loop:
Activity
github-actions commentedon Apr 24, 2026
This issue might be a duplicate of existing issues. Please check:
For keybind-related issues, please also check our pinned keybinds documentation: #4997
github-actions commentedon Jul 4, 2026
To stay organized issues are automatically closed after 60 days of no activity. If the issue is still relevant please open a new one.