https://bugs.kde.org/show_bug.cgi?id=480490

--- Comment #4 from John <ilikef...@waterisgone.com> ---
Other problems, with Italian and Romanian layouts:
Firefox (go back and forward) fails with these shortcuts, that work with the
English layout:
CTRL + [
CTRL + ]
Actually for Italian is worse here as only CTRL + ] works and that does other
thing, which is zoom in and I don't know how to zoom out, except for Ctrl + 0,
which thankfully works.

I have yet to test in Chromium-based browsers, when I will have the time.

But thinking about how Windows does this successfully, I tried to search a bit
about this problem and how it can be solved and I think I found a good article,
for web developers, but anyway, maybe it's useful for any developer who wants
to solve this problem here too:
https://tkainrad.dev/posts/why-keyboard-shortcuts-dont-work-on-non-us-keyboard-layouts-and-how-to-fix-it/
And if you folow that link inside that neat little web tool, that points here:
https://w3c.github.io/uievents/tools/key-event-viewer.html
I see that, if I try to test the first problematic key,\ for Kodi, then:
charCode    keyCode which   code        key     Input field
0           220     220     Backslash   \       '\'           - English (US)
0           220     220     Backslash   ù       'ù'           - Italian
0           220     220     Backslash   â       'â'           - Romanian
0           220     220     Backslash   ґ       'ґ'           - Ukrainian
0           220     220     Backslash   \       '\'           - Greek
We see that only the "key" and "Input field" change when the keyboard layout
language is changed.

Can't Kwin or whoever is dealing with getting keyboard input and passing it to
programs just pass the non-changing things, like the "keyCode", "which", or
"code"?
I mean, since the physical keyboard is actually the same for English and every
other language, then the other language layouts are just some post-processing /
faking on the actually key that was pressed so we can type characters in other
languages, shouldn't for shortcuts just be sent the key codes of the actually
keys that were pressed on the keyboard?
Can't a program in Linux receive keyboard inputs on 2 channels, for example:
Channel 1: Original, non-post-processed / non-faked key codes to be used for
shortcuts.
Channel 2: Post-processed / faked / translated keys, characters to be inserted
as they were received, such as text, emojis, whatever
?

I don't think anyone or many bother to create programs that accept shortcuts in
multiple languages with other than English characters since many of us have
physical US-based layout keyboard, but I might be wrong as I've seen that at
least Germany and Italy have a lot of actual physical layouts with their
languages layouts. Though I never heard of Firefox or any other program have
non-English shortcuts.

-- 
You are receiving this mail because:
You are watching all bug changes.

Reply via email to