-
Notifications
You must be signed in to change notification settings - Fork 29.4k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Keyboard shortcuts not matching layout locale #143442
Comments
Our default keybindings are optimized for the US keyboard layout. In this particular case,
You can rebind this command to a different key combination and you can use keyboard layout independent keys in your Having better default keybindings for more keyboard layouts is something you can upvote at #1240 |
@alexdima Thanks for the answer! Is this a situation with just Linux or what am I missing here? 🤔 : Windows version of vscode properly maps f.ex. opening a terminal to |
This way of mapping that I described above is the way of doing it on Linux and macOS, where we dispatch by default on On Windows, we interpret things differently, by default "Fold" is mapped to |
@alexdima Thanks for the answer, again! It's good to know that there are issues OSwise that are not strictly trivial. Just to be clear: Can't I just make a pull request to create a file like this but for Linux instead of Windows: https://github.com/microsoft/vscode/blob/main/src/vs/workbench/services/keybinding/browser/keyboardLayouts/sv.win.ts ? |
Good search skills! :). In regular VS Code (desktop version) we've written a C++ node module -- https://github.com/microsoft/node-native-keymap -- which we use to listen to OS keyboard layout changes and to read the entire current keyboard layout. You can see this in action in VS Code when you switch keyboard layouts and the default keybindings update. You can see even more info from this module by opening a file and using However, VS Code can run entirely in a browser e.g. I think your question is more "what would be necessary to implement #1240". Basically, we would either have to enrich the way keybindings are registered in source code (e.g. vscode/src/vs/editor/contrib/folding/browser/folding.ts Lines 705 to 712 in 32456dc
Extensions can remove or add default keybindings. So in the short term, our proposed solution for this situation is that someone passionate creates an extension, let's say "Swedish layout keymap" and publishes it to the marketplace. The principle is very similar to other keymap extensions e.g. https://github.com/Microsoft/vscode-notepadplusplus-keybindings and such an extension can redefine some of the builtin keybindings which are not bound well, etc. Such an extension can then be shared via the marketplace. |
Does this issue occur when all extensions are disabled?: Yes
Steps to Reproduce:
ctrl + shift+ `
The text was updated successfully, but these errors were encountered: