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
Title: Windows: TUI keybindings only work with the English keyboard layout #55371
Letter-based TUI keybindings do not work while the Russian keyboard layout is active.
For example, the default sidebar toggle sequence (Ctrl+X, then B) works with the English layout but does not work with the Russian layout when pressing the same physical keys.
Steps to reproduce
Start OpenCode on Windows with the default keybindings.
Switch to the English keyboard layout.
Press Ctrl+X, then B. The sidebar toggles.
Switch to the Russian keyboard layout.
Press the same physical keys. The sidebar does not toggle.
Expected behavior
Keyboard shortcuts should work with both layouts without requiring the user to switch to English.
Actual behavior
The shortcut only works with the English keyboard layout.
Environment
OpenCode: 2.0.29
OS: Windows
Architecture: x64
Shell: PowerShell
Installation: npm, @opencode/cli
Keyboard layouts: English and Russian
Impact
Users typing in Russian must switch to English to use letter-based shortcuts, then switch back to continue typing.
Thanks for the clear report! One detail is missing before we can try to reproduce this: which terminal are you running OpenCode in? For example Windows Terminal (and its version), the classic console window (conhost), WezTerm, the VS Code integrated terminal, etc. PowerShell is the shell, but the terminal is what matters here.
OpenCode v2 can fall back to the physical key for non-Latin layouts, but only if the terminal reports the base-layout key (through the Kitty keyboard protocol). So whether this works depends on the terminal. If you can, please also say whether other shortcuts that use a letter key (for example Ctrl+C) work while the Russian layout is active.
You can reply here with the details or edit the issue. If you edit it, please also leave a short comment saying you've updated it, so we know you're done.
These related issues may help. The list is ordered by likelihood, most likely first:
This issue occurs because the TUI keybinding handler is likely evaluating input events based on decoded character streams (runes / localized string values) rather than physical Virtual Key Codes (VK codes) or scancodes.
When switched to the Russian layout, pressing the physical B key emits its Cyrillic equivalent (e.g., и). Because the secondary sequence listener specifically expects the ASCII character b (byte 98) rather than the physical key mapping, the keybinding fails to trigger.
The initial modifier step (Ctrl+X) works because standard control modifier sequences bypass character mapping and directly pass the control code, but the subsequent raw letter input is affected by the active layout.
Suggested Fix & Implementation Strategy
Depending on the underlying event handling layer used by the CLI/TUI:
Physical Key/VK Code Binding (Recommended for Windows):
Instead of listening for string/character values, bind shortcuts to physical key events or low-level Virtual Key Codes (e.g., VK_B on Windows). This ensures keybindings remain layout-agnostic and respond strictly to the physical key position.
Cyrillic-to-QWERTY Mapping Fallback:
If switching to VK code listening requires breaking architectural changes, implement a layout normalization fallback layer in the keybinding interceptor that maps Cyrillic characters back to their QWERTY physical equivalents when evaluating shortcut triggers:
// Example fallback mapping for QWERTY <-> Russian layoutconstRU_TO_EN_MAP: Record<string,string>={'и': 'b','ч': 'x',// ... other key mappings};functionnormalizeKey(inputKey: string): string{returnRU_TO_EN_MAP[inputKey.toLowerCase()]||inputKey;}
We're closing this issue for now because we haven't heard back about which terminal you run OpenCode in (Windows Terminal and its version, conhost, WezTerm, VS Code, etc.).
We need that to reproduce the problem. OpenCode v2 can only match shortcuts by physical key on a Russian layout if the terminal reports the base-layout key, so without knowing the terminal we can't tell an OpenCode bug from a terminal limitation.
If this still happens on the latest v2, please reopen this issue or open a new one with your terminal and its version, and say whether other letter shortcuts (e.g. Ctrl+C) work with the Russian layout. Thanks for reporting!
Activity
opencode-agent commentedon Oct 14, 2026
Thanks for the clear report! One detail is missing before we can try to reproduce this: which terminal are you running OpenCode in? For example Windows Terminal (and its version), the classic console window (conhost), WezTerm, the VS Code integrated terminal, etc. PowerShell is the shell, but the terminal is what matters here.
OpenCode v2 can fall back to the physical key for non-Latin layouts, but only if the terminal reports the base-layout key (through the Kitty keyboard protocol). So whether this works depends on the terminal. If you can, please also say whether other shortcuts that use a letter key (for example
Ctrl+C) work while the Russian layout is active.You can reply here with the details or edit the issue. If you edit it, please also leave a short comment saying you've updated it, so we know you're done.
These related issues may help. The list is ordered by likelihood, most likely first:
Ctrl+.doesn't work with the Russian layout (v1 desktop app)ahsan-python commentedon Oct 14, 2026
can i help ### Root Cause Analysis
This issue occurs because the TUI keybinding handler is likely evaluating input events based on decoded character streams (
runes/ localized string values) rather than physical Virtual Key Codes (VK codes) or scancodes.When switched to the Russian layout, pressing the physical
Bkey emits its Cyrillic equivalent (e.g.,и). Because the secondary sequence listener specifically expects the ASCII characterb(byte 98) rather than the physical key mapping, the keybinding fails to trigger.The initial modifier step (
Ctrl+X) works because standard control modifier sequences bypass character mapping and directly pass the control code, but the subsequent raw letter input is affected by the active layout.Suggested Fix & Implementation Strategy
Depending on the underlying event handling layer used by the CLI/TUI:
Physical Key/VK Code Binding (Recommended for Windows):
Instead of listening for string/character values, bind shortcuts to physical key events or low-level Virtual Key Codes (e.g.,
VK_Bon Windows). This ensures keybindings remain layout-agnostic and respond strictly to the physical key position.Cyrillic-to-QWERTY Mapping Fallback:
If switching to VK code listening requires breaking architectural changes, implement a layout normalization fallback layer in the keybinding interceptor that maps Cyrillic characters back to their QWERTY physical equivalents when evaluating shortcut triggers:
opencode-agent commentedon Oct 17, 2026
We're closing this issue for now because we haven't heard back about which terminal you run OpenCode in (Windows Terminal and its version, conhost, WezTerm, VS Code, etc.).
We need that to reproduce the problem. OpenCode v2 can only match shortcuts by physical key on a Russian layout if the terminal reports the base-layout key, so without knowing the terminal we can't tell an OpenCode bug from a terminal limitation.
If this still happens on the latest v2, please reopen this issue or open a new one with your terminal and its version, and say whether other letter shortcuts (e.g.
Ctrl+C) work with the Russian layout. Thanks for reporting!