Repository navigation
fix(web): Cmd+K and Ctrl+L clear the terminal on non-Latin keyboard layouts - #44082
AymanKhan9 wants to merge 1 commit into
Conversation
…ayouts Co-Authored-By: Claude Opus 5.5 <[email protected]>
|
No actionable comments were generated in the recent review. Walkthrough
Merge Risk:
|
|
Thanks for this. Before a bug fix is taken further, the bug is reproduced on current main, and here it did not appear. We ran this on main at 3fcfcae with the Russian layout active and used real OS keystrokes, not synthetic events. On Linux we used the web app in Chrome; on macOS we used the desktop app. Each time we filled the terminal with output and pressed the shortcut. Ctrl with the physical L key (which types д) cleared the terminal on both platforms. Cmd with the physical K key on macOS cleared it too. You're right that the clear-shortcut check compares event.key, and that on Linux it sees "д" and returns false. The event then goes to the terminal's key encoder, though, and that encoder works from the physical key code, so the shell still gets ^L. On macOS, Command shortcuts report the Latin letter even under the Russian layout: the page sees key "k", so the existing check already matches. We couldn't find a case where the shortcut fails for a user. If you've seen it fail on a specific layout, OS or browser, please tell us which and we'll take another look. Closing this pull request. If it still happens for you, please open an issue with the exact steps, what you see, and the version and platform you are on; a fix is picked up from there. |
On a non-Latin keyboard layout (Russian, Greek, Hebrew, …), Ctrl+L and Cmd+K never cleared the terminal. The shortcut check compared
event.keyagainst"l"/"k", but on those layoutsevent.keyis the layout's own letter (e.g.д/л), so the check always failed. Every other shortcut already handles this throughresolveEventKeys, which falls back to the physical key.isTerminalClearShortcutnow usesresolveEventKeyslike the rest of the keybinding matcher. Added tests for Ctrl+L and Cmd+K on a Russian layout; they fail on main and pass with the fix.Surfaces: web and desktop share this terminal code. Mobile has no terminal clear shortcut.
Model: Claude Opus 5.5, via Claude Code in T3 Code.
🤖 Generated with Claude Code