Skip to content
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 seem to be layout dependent. #65275

Open
BrunoDSL opened this issue Sep 3, 2022 · 1 comment
Open

Keyboard shortcuts seem to be layout dependent. #65275

BrunoDSL opened this issue Sep 3, 2022 · 1 comment

Comments

@BrunoDSL
Copy link

BrunoDSL commented Sep 3, 2022

Godot version

v3.5.stable.official [991bb6a] (Also tested with 4.0 alpha 15)

System information

Windows 10 21H2 x64

Issue description

Some editor shortcuts seem to be hard coded to a specific keyboard layout rather (US) rather than be a universal. One example of that is the shortcut to toggle the scripts panel in the built-in editor is Ctrl+\ . I have a ABNT2 keyboard layout and going for the tool tip instruction and pressing that shortcut doesn't do anything. I can only hide said panel by hitting Ctrl+]. In my layout, the ] key is where the \ key would be in an Us keyboard layout. Attempting to remap the command to what Ctrl+\ would be in my layout results in a shortcut of Ctrl+Unknown. After testing with other mappings, it gives out the keycodes for where those keys would be in the US layout.

Steps to reproduce

  • Attempt to use and remap shortcuts which require accents and such using a keyboard layout different from US.

Minimal reproduction project

N/A

@Calinou
Copy link
Member

Calinou commented Sep 3, 2022

Related to #11777.

This is because Godot doesn't use physical key inputs for editor shortcuts. There are two issues at hand:

  • Editor shortcuts where it makes sense should be changed to use physical keys by default. This needs to be done on a case-by-case basis. This shouldn't apply to keys that map to a "logical" location (e.g. G to "grab"). However, this should apply to keys that often have layout compatibility issues, such as Ctrl + / to toggle commenting on lines (this is a frequent issue on AZERTY layouts). This should also apply to keys that are mapped relative to each other (such as WASD movement for 3D freelook in the editor).
  • In 3.x, editor shortcuts will ignore physical keys even if you specify them by modifying the editor C++ code. This is supported in master though. However, backporting this from master would require rewriting a lot of the editor shortcut system in a backwards-incompatible way. Therefore, this can only be implemented in 4.x.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants