codesandbox / codesandbox-client

An online IDE for rapid web development
https://codesandbox.io
Other
13.02k stars 2.27k forks source link

Keyboard Layout Ignored (Possibly Reading `keyCode` Instead Of `key`) #8320

Closed fweth closed 6 months ago

fweth commented 7 months ago

🐛 bug report

Preflight Checklist

Description of the problem

It seems that my keyboard layout (Colemak) is not recognized by CodeSandbox for shortcuts (like Cmd+N, Cmd+K). It seems to look at the keyCode and map it to some QWERTY layout instead of reading out the key property of a key event?

How has this issue affected you? What are you trying to accomplish?

Almost impossible to use if all my shortcuts are gone. This is also a known problem with VSCode, but in the VSCode settings, "keyboard.dispatch": "keyCode", does the trick (which is unintuitive, should be the other way around, but anyway, it works).

Your Environment

Software Name/Version
Сodesandbox
Browser Firefox 122.0b9
Operating System Ubuntu 23.04
fweth commented 7 months ago

Here is the relevant part from the VSCode docs, I don't know if the CSB editor depends on VSCode: https://github.com/Microsoft/vscode/wiki/Keybinding-Issues#troubleshoot-linux-keybindings

CompuIves commented 7 months ago

Good report, we use VSCode for these keybindings and we might be using the wrong default settings. Thanks for sharing the docs as well! Will investigatge.

fweth commented 6 months ago

Ah hey, I just realized that we can bring our own VSCode settings! In this case I think you did nothing wrong, key is the default in VSCode so it makes sense for CSB to mirror that behaviour, as long as the users can change it :)

tim-phillips commented 1 week ago

Here's the relevant vscode issue: https://github.com/microsoft/vscode/issues/23991