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

Custom keyboard defaults for languages #905

Open
ShalokShalom opened this issue Oct 12, 2017 · 4 comments · May be fixed by #2605
Open

Custom keyboard defaults for languages #905

ShalokShalom opened this issue Oct 12, 2017 · 4 comments · May be fixed by #2605
Labels
port:Qt Affects the Qt version (the standard desktop version) severity:enhancement Feature requests
Milestone

Comments

@ShalokShalom
Copy link

German keyboards suffer from the current default setting. In order to provide sane defaults for them, implement "custom keybindings for the different language settings"

@endrift
Copy link
Member

endrift commented Oct 14, 2017

@RootFather Any input on this? I can try to provide an interface for it.

@ShalokShalom
Copy link
Author

^-^

@lotharsm
Copy link
Member

@endrift indeed, the default keyboard layout is not optimized for German keyboards with a standard QWERTZ keyboard.

As an example, take the default mapping for the A and B button. Per default, the "B" button is mapped to the key Z and the A button is mapped to X. On a QWERTY keyboard, this works perfectly fine and is a good default setting. However, on a German keyboard that uses the QWERTZ layout, the "Y" and the "Z" keys are swapped compared to QWERTY which renders the default "A" and "B" mapping quite useless.

I agree with @ShalokShalom that an interface which provides custom defaults for the different keyboard layouts out there would be a nice addition.

@endrift endrift added port:Qt Affects the Qt version (the standard desktop version) severity:enhancement Feature requests labels Oct 17, 2017
@endrift endrift added this to the mGBA 1.0.0 milestone Oct 17, 2017
@depp
Copy link

depp commented Jul 30, 2022

I also experience this issue. Looks like #393 and #2020 are related. My thoughts:

  • Fixing this issue is easy with the SDL front-end. SDL already provides a platform-independent way to map keys by keyboard location rather than character.
  • Qt provides QKeyEvent::nativeScanCode() that provides the information we want.
  • Unfortunately, Qt's nativeScanCode() is platform-specific.
  • The scancodes for various platforms are known. SDL has tables, for example. It would require some work.
  • To display the input configuration, you'd want to map the configured scancodes to key names, which is not straightforward. Qt does not provide this. There are some platform-specific techniques.
  • It would be nice if this didn't break people's existing configurations.

depp added a commit to depp/mgba that referenced this issue Jul 30, 2022
Core key bindings for SDL >= 2.0 are now independent of the keyboard
layout. QWERTY users get ZXAS, German users get YXAS, French layouts get
WXQS, etc. Existing customizations will be ignored, users with
customized bindings for SDL will get the new defaults and have to create
a new configuration.

Existing functionality is preserved for SDL 1.x.
@endrift endrift linked a pull request Jul 31, 2022 that will close this issue
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
port:Qt Affects the Qt version (the standard desktop version) severity:enhancement Feature requests
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants