Bug 473923

Summary: Combined shortcuts with shift modifier not registering correctly
Product: [Applications] krita Reporter: vanyossi <ghevan>
Component: Shortcuts and Canvas Input SettingsAssignee: Krita Bugs <krita-bugs-null>
Status: RESOLVED FIXED    
Severity: normal CC: dimula73
Priority: NOR    
Version: git master (please specify the git hash!)   
Target Milestone: ---   
Platform: Other   
OS: macOS   
Latest Commit: Version Fixed In:
Sentry Crash Report:

Description vanyossi 2023-08-29 23:18:32 UTC
git (e0fa60d68f)

This is only true for numbers and symbols and macOS.

Trying to set a shortcut to [cmd] + [shift] + [top row number or symbol] results in:
- for numbers -> [cmd] + [number] , ignoring shift or if focus is lost during setting it, [cmd] + [symbol under the number]
- for symbols -> [cmd] + [symbol if shift is pressed]

usint [alt] (on macOS is ⌥) is registered but in conjunction with shift it registers the "shift" modified simbol instead of the vanilla press which breaks the shortcut in the GUI. example: ‹‹ cmd + ⌥ + shift + 1 ›› -> becomes —> ‹‹ cmd + ⌥ + ! ›› 

This two cases make the shortcut invalid when calling it from the painting session.

it only works correctly with letters even if the letter it registered was uppercased [cmd] + [shift] + [n] -> [cmd] + [shift] + [N]
Comment 1 vanyossi 2023-08-29 23:44:30 UTC
related on windows bug 459557, it might be the same bug. however in macOS shift is ignored.
Comment 2 Dmitry Kazakov 2023-11-12 13:31:25 UTC
The bug looks related to https://bugs.kde.org/show_bug.cgi?id=454256
Comment 3 Dmitry Kazakov 2023-11-24 10:41:46 UTC
Git commit 97892008fae1f51d44a787a94a4c474d9df8f031 by Dmitry Kazakov.
Committed on 24/11/2023 at 11:39.
Pushed by dkazakov into branch 'master'.

Use Qt's private headers directly to access QKeyMapper on all platforms

The fix is also needed on macOS, so it will be easier just to access
the keymapper directly.

M  +1    -1    3rdparty/ext_qt/CMakeLists.txt
M  +0    -9    CMakeLists.txt
D  +0    -4    config-request-possible-keys.h.in
M  +2    -0    libs/widgetutils/CMakeLists.txt
M  +20   -26   libs/widgetutils/xmlgui/kkeysequencewidget.cpp

https://invent.kde.org/graphics/krita/-/commit/97892008fae1f51d44a787a94a4c474d9df8f031
Comment 4 Dmitry Kazakov 2023-11-26 11:54:57 UTC
Git commit 432a82f10f66a6b6d072327804b178a058e47ffb by Dmitry Kazakov.
Committed on 26/11/2023 at 12:53.
Pushed by dkazakov into branch 'krita/5.2'.

Use Qt's private headers directly to access QKeyMapper on all platforms

The fix is also needed on macOS, so it will be easier just to access
the keymapper directly.

M  +1    -1    3rdparty/ext_qt/CMakeLists.txt
M  +0    -9    CMakeLists.txt
D  +0    -4    config-request-possible-keys.h.in
M  +2    -0    libs/widgetutils/CMakeLists.txt
M  +20   -26   libs/widgetutils/xmlgui/kkeysequencewidget.cpp

https://invent.kde.org/graphics/krita/-/commit/432a82f10f66a6b6d072327804b178a058e47ffb