Bug 464175 - Pressing Ctrl+Shift+2 blocks spacebar panning and mouse right click
Summary: Pressing Ctrl+Shift+2 blocks spacebar panning and mouse right click
Status: RESOLVED FIXED
Alias: None
Product: krita
Classification: Applications
Component: Shortcuts and Canvas Input Settings (show other bugs)
Version: 5.1.5
Platform: Microsoft Windows Microsoft Windows
: NOR normal
Target Milestone: ---
Assignee: Krita Bugs
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2023-01-12 00:05 UTC by YRH
Modified: 2023-11-15 09:55 UTC (History)
2 users (show)

See Also:
Latest Commit:
Version Fixed In:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description YRH 2023-01-12 00:05:24 UTC
SUMMARY

When working with tenscripts, I noticed that pressing Ctrl+Shift+2 shortcut will prevent spacebar panning (Space + Left mouse click) and color/tools wheel (mouse right click) from working.

Also happened on Krita 5.1.4. I tried a fresh install on another Windows system to be sure it wasn't a problem with my local configuration.

STEPS TO REPRODUCE

1. Install Krita 5.1.5 on Windows 11 (might not be relevant).
2. Create a new document.
3. Click on the canvas, so that it has "focus".
4. Press Ctrl+Shift+2 (will display a message that there's no script assigned to shortcut)
5. Hold down spacebar and left mouse click. Alternatively, right mouse click.

OBSERVED RESULT

- No canvas panning hand icon appears, panning doesn't work.
- No helper color/tool wheel appears.

EXPECTED RESULT

- Panning continues to work (spacebar + left mouse drag moves the canvas around).

SOFTWARE/OS VERSIONS

Windows: Version 10.0.22621.1105

ADDITIONAL INFORMATION

To get back to good state, it's sufficient to left mouse click somewhere on the nearby dockers, e.g. on the current layer.
It seems this bug is somehow related to "focus". If I click on a layer docker and then press Ctrl+Shift+2 and then attempt to pan the canvas, it will work as expected. The bug will not be triggered.
Other shortcuts such as Ctrl+Shift+1 or Ctrl+Shift+3 doesn't trigger the bug either.
Comment 1 YRH 2023-01-13 10:56:41 UTC
Does not happen on Linux (Ubuntu 20.04).
Comment 2 Halla Rempt 2023-03-06 11:17:13 UTC
Thank you for the report. I can reproduce it on Windows, though I have no idea whatsoever why this key combination breaks...
Comment 3 Dmitry Kazakov 2023-11-12 12:31:03 UTC
Hi, YRH!

Could you tell what keyboard layout you use? Is it something different from EN-US?

If it is non-US layout, then I **can** reproduce the issue in master. Though I cannot reproduce that in EN-US layout.
Comment 4 YRH 2023-11-12 16:48:55 UTC
Hi, unfortunately, it doesn't seem to depend on the keyboard layout on my systems. I tested two Windows 11 installations, tried a few language and layout setups, two keyboard types (full and TKL), as well as another system with a fully fresh Krita 5.2.1 install, US display language, US region, and the only one US keyboard layout.

At any time I press CTRL+SHIFT+2 while painting on canvas, middle mouse button (pan canvas) will stop working. Then I can get it back to work by left-clicking inside the layers docker.

I didn't use any pen input at this time. Windows 11 versions were 22H2 and 23H2. I don't have a Windows 10 install at the moment.
Comment 5 Dmitry Kazakov 2023-11-13 09:09:14 UTC
Hi, YRH!

Are you sure you used EN-US layout for all these test? I cannot reproduce the issue, however hard I try. The issue happens only when I activate Russian layout. Even French layout doesn't break it :)
Comment 6 Dmitry Kazakov 2023-11-13 09:33:20 UTC
This is the log when using RU-RU layout:

The key-press for the '2' key arrives as Qt::Key_At and key-release arrives and Qt::Key_2, which blocks confuses the shortcuts matcher


[9556] krita.tabletlog: "[       ] ShortcutOverride key: 0x1000021 mod: 0x4000000 text: none autorepeat: 0"
[9556] keyPressed - Pressed keys: QSet(Qt::Key_Control)
[9556] tryActivateReadyShortcut - Deactivated previous shortcut action act: "Tool Invocation"
[9556] tryActivateReadyShortcut - Preparing new ready action act: "Alternate Invocation"

[9556] krita.tabletlog: "[       ] ShortcutOverride key: 0x1000020 mod: 0x6000000 text: none autorepeat: 0"
[9556] keyPressed - Pressed keys: QSet(Qt::Key_Shift, Qt::Key_Control)
[9556] tryActivateReadyShortcut - Deactivated previous shortcut action act: "Alternate Invocation"
[9556] tryActivateReadyShortcut - Preparing new ready action act: "Alternate Invocation"

[9556] krita.tabletlog: "[       ] ShortcutOverride key: 0x40 mod: 0x6000000 text: 2 autorepeat: 0"
[9556] keyPressed - Pressed keys: QSet(Qt::Key_Shift, Qt::Key_Control, Qt::Key_At)
[9556] tryActivateReadyShortcut - Deactivated previous shortcut action act: "Alternate Invocation"
[9556] tryActivateReadyShortcut - Preparing new ready action act: "Tool Invocation"

[9556] krita.tabletlog: "[       ] KeyRelease       key: 0x40 mod: 0x6000000 text: 2 autorepeat: 1"
[9556] krita.tabletlog: "[       ] ShortcutOverride key: 0x40 mod: 0x6000000 text: 2 autorepeat: 1"

# FAULTY KEY RELEASE
[9556] krita.tabletlog: "[       ] KeyRelease       key: 0x32 mod: 0x6000000 text: 2 autorepeat: 0"

[9556] keyReleased - Peculiar, key released but can't remember it was pressed
[9556] keyReleased - Released keys: QSet(Qt::Key_Shift, Qt::Key_Control, Qt::Key_At)
[9556] krita.tabletlog: "[       ] KeyRelease       key: 0x1000020 mod: 0x4000000 text: none autorepeat: 0"
[9556] keyReleased - Released keys: QSet(Qt::Key_Control, Qt::Key_At)
[9556] krita.tabletlog: "[       ] KeyRelease       key: 0x1000021 mod: 0x0 text: none autorepeat: 0"
[9556] keyReleased - Released keys: QSet(Qt::Key_At)
[9556] krita.tabletlog: "[       ] ShortcutOverride key: 0x20 mod: 0x0 text:   autorepeat: 0"
[9556] keyPressed - Pressed keys: QSet(Qt::Key_Space, Qt::Key_At)
[9556] krita.tabletlog: "[       ] KeyRelease       key: 0x20 mod: 0x0 text:   autorepeat: 1"
[9556] krita.tabletlog: "[       ] ShortcutOverride key: 0x20 mod: 0x0 text:   autorepeat: 1"
[9556] krita.tabletlog: "[       ] KeyRelease       key: 0x20 mod: 0x0 text:   autorepeat: 1"
[9556] krita.tabletlog: "[       ] ShortcutOverride key: 0x20 mod: 0x0 text:   autorepeat: 1"
[9556] krita.tabletlog: "[       ] KeyRelease       key: 0x20 mod: 0x0 text:   autorepeat: 1"
Comment 7 YRH 2023-11-13 11:07:48 UTC
Yes, I'm sure of it. I removed all other languages and keyboard layouts, only left English/US with US keyboard layout. It didn't matter. I have no idea why the behavior is inconsistent.
Comment 8 Dmitry Kazakov 2023-11-13 14:47:35 UTC
Hi, YRH!

Could you please check this package? I think I have fixed this issue, even though I don't know how it could happen without an extra layout present in the system...

https://disk.yandex.ru/d/W8rcGcmyZqMrTg
Comment 9 YRH 2023-11-13 21:58:10 UTC
Hi Dmitry,

CTRL+SHIFT+2 bug is fixed with your build. To be double sure, I checked master top of tree (f54e9e106e) and the bug still occurred there. So it looks like you have the fix, that's great!
Comment 10 Dmitry Kazakov 2023-11-15 09:54:32 UTC
Git commit 44586919d56d98763ed04a8a3e9ddd3e8045d40f by Dmitry Kazakov.
Committed on 15/11/2023 at 10:54.
Pushed by dkazakov into branch 'master'.

Fixes for Qt: MDI titles and unbalanced non-us shortcuts

M  +1    -1    3rdparty/ext_qt/CMakeLists.txt

https://invent.kde.org/graphics/krita/-/commit/44586919d56d98763ed04a8a3e9ddd3e8045d40f
Comment 11 Dmitry Kazakov 2023-11-15 09:55:48 UTC
Git commit 33bd0de4122a5c1a766fb1cc13c4df8522833298 by Dmitry Kazakov.
Committed on 15/11/2023 at 10:55.
Pushed by dkazakov into branch 'krita/5.2'.

Fixes for Qt: MDI titles and unbalanced non-us shortcuts

M  +1    -1    3rdparty/ext_qt/CMakeLists.txt

https://invent.kde.org/graphics/krita/-/commit/33bd0de4122a5c1a766fb1cc13c4df8522833298