I type a lot using a Dvorak layout and use a lot of art programs. KDE4 was a perfect match for me because I could switch keyboard maps but still use QWERTY for keyboard shortcuts, (Dvorak is great for typing but horrible for keyboard shortcuts - as these have almost almost been designed with QWERTY in mind and are almost impossible to use in an art program where one hand is almost always on a mouse or tablet). This was KDE 4's killer feature for me, somehow I assumed that it was there because people got how keymaps should be used (keyboard shortcuts are designed for their physical position on the keyboard the mnemonic is completely secondary). In retrospect it may have been a bug. Reproducible: Always Steps to Reproduce: 1. Add a American English - Dvorak keyboard layout (on top of having the standard American English layout) 2. Switch layouts using a keyboard shortcut (in my case CTRL + ALT + K) 3. try to copy and paste using the keyboard Actual Results: In order to copy I need to hit 'C' on the Dvorak layout which is 'I' and a real stretch for the hand. In order to paste I need to hit 'V' which is even worse '>'. Expected Results: Ctrl C and V should operate on the physical keys - very easy to do with the left hand Of course in this specific case I could use the mouse but it should Illustrate that unless you want to remap every shortcut key in every program you use, Using non QWERTY shortcut keys for many layouts can suck. I either have to switch keyboard maps every time I want to enter text or constantly move my right hand backwards and forwards between the keyboard and the mouse. Neither of these are very efficient or fun.
I am not a KDE developer, but it works the same way on Ubuntu and macOS and Windows, so looks like that is the expected behavior and KDE4 maybe had some tweaks or a fluke. In Qt5 the algorithm is: http://code.qt.io/cgit/qt/qtbase.git/tree/src/plugins/platforms/xcb/qxcbkeyboard.cpp#n1021 "If pressing a key in the current layout results in a latin key, we are done. If not (e.g. the current layout is in a different alphabet rusian), then we look for a latin key in all selected system layouts, in the order they are defined in the system settings. When we find a latin key for the pressed key, we verify if the resulting symbol could not be obtained by any layout higher in the list." An example when pressing ctrl+<physical C> and the active layout is rusian: If the layout order is en,ru,en(dvorak) you will get ctlr+c If the layout order is en(dvorak),ru,en you will get ctrl+j
(In reply to Gatis Paeglis from comment #1) > I am not a KDE developer, but it works the same way on Ubuntu and macOS and > Windows, so looks like that is the expected behavior and KDE4 maybe had some > tweaks or a fluke. > > In Qt5 the algorithm is: > http://code.qt.io/cgit/qt/qtbase.git/tree/src/plugins/platforms/xcb/ > qxcbkeyboard.cpp#n1021 > > "If pressing a key in the current layout results in a latin key, we are > done. If not (e.g. the current layout is in a different alphabet rusian), > then we look for a latin key in all selected system layouts, in the order > they are defined in the system settings. When we find a latin key for the > pressed key, we verify if the resulting symbol could not be obtained by any > layout higher in the list." > > An example when pressing ctrl+<physical C> and the active layout is rusian: > > If the layout order is en,ru,en(dvorak) you will get ctlr+c > If the layout order is en(dvorak),ru,en you will get ctrl+j I'd argue that some shortcuts should be "global" and work on and layout like "Alt+~" for switching windows of same application. maybe having "global" (work on any layout) as an option for a shortcut should be considered
This would be nice to have - was about to report something similar.
Hi - there's another issue around how to handle hotkey/shortcut assignments when multiple keyboard layouts are involved, with a lot of context and activity (including references to upstream Qt work), so I think it would be best to link this issue in with that other one. Thanks! *** This bug has been marked as a duplicate of bug 453661 ***