| Summary: | Support triggering keyboard shortcuts according to physical key position, ignoring current layout | ||
|---|---|---|---|
| Product: | [Applications] systemsettings | Reporter: | Danni Coy <danni.coy> |
| Component: | kcm_keyboard | Assignee: | Andriy Rysin <arysin> |
| Status: | RESOLVED DUPLICATE | ||
| Severity: | wishlist | CC: | contramuffin, eifr0980, gatis.paeglis, john.kizer, nate |
| Priority: | NOR | ||
| Version First Reported In: | unspecified | ||
| Target Milestone: | --- | ||
| Platform: | Ubuntu | ||
| OS: | Linux | ||
| Latest Commit: | Version Fixed/Implemented In: | ||
| Sentry Crash Report: | |||
|
Description
Danni Coy
2015-03-26 15:53:24 UTC
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 *** |