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 layout-sensitive shortcuts #319

Closed
FrenzyYum opened this issue Sep 2, 2021 · 3 comments
Closed

Keyboard layout-sensitive shortcuts #319

FrenzyYum opened this issue Sep 2, 2021 · 3 comments

Comments

@FrenzyYum
Copy link

When launching the player with English keyboard chosen and changing the keyboard language there shows no issues and all the shortcuts work as expected. However, if you start the player with non-English keyboard layout (Russian uses Cyrillic letters, for instance), shortcuts that are assigned to English letters don't work. Switching back to English layout does not work and the only option is to restart the player with English layout chosen.

The issue here is that the input editor accepts and reads keys as letters (I can assign Russian letters-shortcuts to individual commands and it works) and not as keycodes. I believe the quick workaround, if implementing keycodes would take too much time or not something in priority, is to detect WM_INPUTLANGCHANGE since you read keyboard events anyway here and to load the hotkeys again whenever a switch to English layout is made so no player restart would be needed.

@hooke007
Copy link
Collaborator

hooke007 commented Sep 3, 2021

Sounds like mpv-player/mpv#9168 (comment)

@FrenzyYum
Copy link
Author

FrenzyYum commented Sep 3, 2021

Sounds like mpv-player/mpv#9168 (comment)

That's a different issue, I can change the language in mpv.net window, it just doesn't do anything.

Just checked whether this shortcut bug persists in mpv and it does as well. Fun part is, changing the language via a taskbar switcher does the trick in mpv and the shortcuts start working.

I believe this is what it really sounds like mpv-player/mpv#351. Almost 10 years and no solution implemented though.

@stax76
Copy link
Collaborator

stax76 commented Sep 3, 2021

Just checked whether this shortcut bug persists in mpv and it does as well.

So it's an upstream problem, mpv.net does not process messages like WM_KEYDOWN, it only forwards the messages to libmpv.

https://github.com/stax76/mpv.net/blob/master/src/Misc/MainForm.cs#L742

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