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

Make all editor shortcuts use physical keycodes #7303

Closed
geowarin opened this issue Jul 16, 2023 · 3 comments
Closed

Make all editor shortcuts use physical keycodes #7303

geowarin opened this issue Jul 16, 2023 · 3 comments

Comments

@geowarin
Copy link

Describe the project you are working on

NA

Describe the problem or limitation you are having in your project

I'm using a french azerty keyboard, which requires me to remap a bunch of keyboard shortcuts for the editor to be used confortably.

In particular, the Flycam, the gridmap and anything using numbers is inaccessible or cluncky for me.

Describe the feature / enhancement and how it helps to overcome the problem or limitation

Some shortcuts like the Freelook camera use WASD for movement, which translates to ZQSD on my keyboard.

Godot has the ability to use physical keycodes, which translate qwerty keycodes to the position of the key on any layout.

This is use selectively on some features, like the Freelook Cam for instance.

Is there a reason why we don't generalize the use of physical keys as a default for all the shortcuts in the editor?

Describe how your proposal will work, with code, pseudo-code, mock-ups, and/or diagrams

Change the ED_SHORTCUT function so that the p_physical parameter is true by default.

If this enhancement will not be used often, can it be worked around with a few lines of script?

Non-qwerty users can manually remap all the problematic shortcuts in the IDE but this is not very convenient.

Is there a reason why this should be core and not an add-on in the asset library?

This would improve the first time usability of the editor for a lot of users

@zinnschlag
Copy link

Disagreed. I am using a QWERTZ keyboard. Using physical keycodes instead of logic ones would mess up my well established muscle memory (or more like force me to remap the keys). Undo is an obvious case here. Maybe another argument could be made about dead keys.

This change would likely cause problems with as many layouts as it would improve the situation with other layouts, which is a good argument to avoid it. Applying this change would use developer manpower to move a problem around instead of solving it.

@Calinou
Copy link
Member

Calinou commented Jul 16, 2023

The general advice when designing apps is to not make shortcuts dependent on physical keycodes. Otherwise, shortcuts that are formerly logical (such as Ctrl + A with the "A" meaning "add" or "all") can become nonsensical on certain keyboard layouts.

Since Godot 4.1, freelook uses physical key shortcuts by default, so that it works correctly on non-QWERTY keyboard layouts. This is one of the areas where it makes sense to do an exception, as "WASD" are not supposed to mean anything. Instead, the layout is the most relevant part of those shortcuts.

(For reference, I use a French AZERTY keyboard layout. We still often get the short end of the stick in both games and apps as of 2023, with the behavior sometimes depending on the OS.)

@geowarin
Copy link
Author

You're both right most shortcuts are not layout dependent and do not require physical keycodes.

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

5 participants