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

Letters are incorrect on non-Qwerty Keyboard layouts #1

Open
AaronRecord opened this issue Aug 18, 2020 · 5 comments
Open

Letters are incorrect on non-Qwerty Keyboard layouts #1

AaronRecord opened this issue Aug 18, 2020 · 5 comments

Comments

@AaronRecord
Copy link

I'm currently using the Dvorak keyboard layout and the letter particles that appear are still mapped to Qwerty

@jotson
Copy link
Owner

jotson commented Aug 20, 2020

What OS are you using? I don't know how Dvorak works... are you using software to translate letters (s => o) and you rearranged the keycaps?

It looks like Godot does have some problems with this. There's an open bug godotengine/godot#5503 for detecting keyboard layout.

@AaronRecord
Copy link
Author

@jotson I'm using Windows 10, Dvorak is just an alternate layout to Qwerty where the letters are arranged by how often they're used (e.g. the most commonly used letters are on the home row) that I'm learning mostly for fun

are you using software to translate letters (s => o)

yes

and you rearranged the keycaps?

no, I just don't look at the keyboard :)

Most programs (Godot included) work normally including all the keyboard shortcuts (e.g. W for move tool) and the only time the keyboard layout actually matters is when you're typing (which is how it probably should work since most keyboard shortcuts are designed for QWERTY). I'd assume it's because they're reading the keyboard input before the letters get mapped to whatever keyboard layout someone is using. This is also true for Godot's input system (e.g. pressing the physical "a" key will trigger "ui left" if I map "ui left" to the "a" key, regardless of what keyboard layout I'm using), but when I'm actually typing (e.g. writing a script or changing the value of a string) then it uses the Dvorak keyboard layout.

@jotson
Copy link
Owner

jotson commented Aug 20, 2020

I've never tried dvorak before. The proximate cause of the problem is in the OS.get_scancode_string method or get_scancode_with_modifiers in Godot. I use that to generate the strings of keys that were pressed like last_key = OS.get_scancode_string(event.get_scancode_with_modifiers())

Someone with a dvorak layout 👀 who can help troubleshoot the issue will need to file a bug upstream.

@ACB-prgm
Copy link

Idk if this is helpful, but the OS class has a get_latin_keyboard_variant() function:

Returns the current latin keyboard variant as a String.

Possible return values are: "QWERTY", "AZERTY", "QZERTY", "DVORAK", "NEO", "COLEMAK" or "ERROR".

Note: This method is implemented on Linux, macOS and Windows. Returns "QWERTY" on unsupported platforms.

@jitspoe
Copy link
Contributor

jitspoe commented Jul 5, 2023

I don't think this is an issue any more. Could probably be closed.

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

No branches or pull requests

4 participants