SUMMARY While working on an image in Krita, if I switch to an unrelated application window, input something in it, and then come back, Krita's canvas will act as though one or two (or sometimes even three) keyboard keys are being held down as shortcut modifiers, thus preventing any other canvas shortcuts that don't use that modifier from working. Here's an example of what I see in the tablet event log, which shows my keyboard and mouse inputs (I don't use - or own - a drawing tablet). Comments are in double parentheses. ((Start up Krita and turn on the tablet log)) vvvvvvvvvvvvvvvvvvvvvvv START TABLET EVENT LOG vvvvvvvvvvvvvvvvvvvvvvv ((Open an image)) QPainter::begin: Paint device returned engine == 0, type: 3 QPainter::setCompositionMode: Painter not active QPainter::begin: Paint device returned engine == 0, type: 3 QPainter::setCompositionMode: Painter not active ((Canvas appears. My mouse pointer is not over the canvas.)) "[ ] Enter " "[ ] FocusIn " "[ ] FocusOut " "[ ] Enter " "[ ] FocusIn " ((I hit the 6 and 4 keys respectively to rotate the canvas right and left to show that yes, canvas shortcuts are being received and work.)) "[ ] ShortcutOverride key: 0x36 mod: 0x0 text: 6 autorepeat: 0" "[ ] KeyRelease key: 0x36 mod: 0x0 text: 6 autorepeat: 0" "[ ] ShortcutOverride key: 0x34 mod: 0x0 text: 4 autorepeat: 0" "[ ] KeyRelease key: 0x34 mod: 0x0 text: 4 autorepeat: 0" ((I then change to a different window (in this case, gvim))) "[ ] FocusOut " ((While in that new gvim window, I type the following: "ithe quick brown fox jumped over the lazy dog<esc>". Then I switch back to Krita by clicking on the window, and get this.)) "[ ] Enter " "[ ] FocusIn " "[ ] ShortcutOverride key: 0x45 mod: 0x0 text: none autorepeat: 0" "[ ] FocusOut " "[ ] Enter " ((Note the ShortcutOverride key entry, claiming that key 0x45 ("e") is currently pressed. I have not pressed this key.)) ((I try to hit the 6 and 4 keys again to see if they have any effect. Not only do they have no effect, nothing appears in the log.)) ((I then move my mouse pointer into and out of the canvas area, and try using the mousewheel to see if it will zoom in and out like it should. It does not.)) "[ ] MouseMove btn: 0 btns: 0 pos: 7,1044 gpos: 327,1174 hires: 327, 1174 Source:0" "[ ] MouseMove btn: 0 btns: 0 pos: 17,1048 gpos: 337,1178 hires: 337, 1178 Source:0" "[ ] MouseMove btn: 0 btns: 0 pos: 24,1050 gpos: 344,1180 hires: 344, 1180 Source:0" "[ ] MouseMove btn: 0 btns: 0 pos: 32,1053 gpos: 352,1183 hires: 352, 1183 Source:0" "[ ] MouseMove btn: 0 btns: 0 pos: 39,1055 gpos: 359,1185 hires: 359, 1185 Source:0" "[ ] MouseMove btn: 0 btns: 0 pos: 47,1056 gpos: 367,1186 hires: 367, 1186 Source:0" "[ ] MouseMove btn: 0 btns: 0 pos: 54,1059 gpos: 374,1189 hires: 374, 1189 Source:0" "[ ] MouseMove btn: 0 btns: 0 pos: 62,1060 gpos: 382,1190 hires: 382, 1190 Source:0" "[ ] MouseMove btn: 0 btns: 0 pos: 69,1061 gpos: 389,1191 hires: 389, 1191 Source:0" "[ ] MouseMove btn: 0 btns: 0 pos: 74,1063 gpos: 394,1193 hires: 394, 1193 Source:0" "[ ] MouseMove btn: 0 btns: 0 pos: 81,1064 gpos: 401,1194 hires: 401, 1194 Source:0" "[ ] MouseMove btn: 0 btns: 0 pos: 87,1064 gpos: 407,1194 hires: 407, 1194 Source:0" "[ ] MouseMove btn: 0 btns: 0 pos: 93,1064 gpos: 413,1194 hires: 413, 1194 Source:0" "[ ] MouseMove btn: 0 btns: 0 pos: 99,1064 gpos: 419,1194 hires: 419, 1194 Source:0" "[ ] MouseMove btn: 0 btns: 0 pos: 106,1064 gpos: 426,1194 hires: 426, 1194 Source:0" "[ ] MouseMove btn: 0 btns: 0 pos: 112,1065 gpos: 432,1195 hires: 432, 1195 Source:0" "[ ] MouseMove btn: 0 btns: 0 pos: 117,1065 gpos: 437,1195 hires: 437, 1195 Source:0" "[ ] MouseMove btn: 0 btns: 0 pos: 123,1065 gpos: 443,1195 hires: 443, 1195 Source:0" "[ ] MouseMove btn: 0 btns: 0 pos: 129,1065 gpos: 449,1195 hires: 449, 1195 Source:0" "[ ] MouseMove btn: 0 btns: 0 pos: 136,1065 gpos: 456,1195 hires: 456, 1195 Source:0" "[ ] MouseMove btn: 0 btns: 0 pos: 141,1065 gpos: 461,1195 hires: 461, 1195 Source:0" "[ ] MouseMove btn: 0 btns: 0 pos: 147,1065 gpos: 467,1195 hires: 467, 1195 Source:0" "[ ] MouseMove btn: 0 btns: 0 pos: 152,1065 gpos: 472,1195 hires: 472, 1195 Source:0" "[ ] MouseMove btn: 0 btns: 0 pos: 157,1065 gpos: 477,1195 hires: 477, 1195 Source:0" "[ ] MouseMove btn: 0 btns: 0 pos: 162,1063 gpos: 482,1193 hires: 482, 1193 Source:0" "[ ] MouseMove btn: 0 btns: 0 pos: 164,1063 gpos: 484,1193 hires: 484, 1193 Source:0" "[ ] MouseMove btn: 0 btns: 0 pos: 167,1063 gpos: 487,1193 hires: 487, 1193 Source:0" "[ ] MouseMove btn: 0 btns: 0 pos: 168,1063 gpos: 488,1193 hires: 488, 1193 Source:0" "[ ] MouseMove btn: 0 btns: 0 pos: 169,1063 gpos: 489,1193 hires: 489, 1193 Source:0" "[ ] MouseMove btn: 0 btns: 0 pos: 171,1062 gpos: 491,1192 hires: 491, 1192 Source:0" "[ ] Enter " "[ ] FocusIn " "[ ] Wheel btn: - btns: 0 pos: 171,1062 gpos: 491,1192 delta: 1 orientation: V " "[ ] Wheel btn: - btns: 0 pos: 171,1062 gpos: 491,1192 delta: 1 orientation: V " "[ ] Wheel btn: - btns: 0 pos: 171,1062 gpos: 491,1192 delta: 4 orientation: V " "[ ] Wheel btn: - btns: 0 pos: 171,1062 gpos: 491,1192 delta: 18 orientation: V " "[ ] Wheel btn: - btns: 0 pos: 171,1062 gpos: 491,1192 delta: 12 orientation: V " "[ ] Wheel btn: - btns: 0 pos: 171,1062 gpos: 491,1192 delta: 30 orientation: V " "[ ] Wheel btn: - btns: 0 pos: 171,1062 gpos: 491,1192 delta: 30 orientation: V " "[ ] Wheel btn: - btns: 0 pos: 171,1062 gpos: 491,1192 delta: 30 orientation: V " "[ ] Wheel btn: - btns: 0 pos: 171,1062 gpos: 491,1192 delta: 34 orientation: V " "[ ] Wheel btn: - btns: 0 pos: 171,1062 gpos: 491,1192 delta: 34 orientation: V " "[ ] Wheel btn: - btns: 0 pos: 171,1062 gpos: 491,1192 delta: 49 orientation: V " "[ ] Wheel btn: - btns: 0 pos: 171,1062 gpos: 491,1192 delta: 151 orientation: V " "[ ] Wheel btn: - btns: 0 pos: 171,1062 gpos: 491,1192 delta: 53 orientation: V " "[ ] Wheel btn: - btns: 0 pos: 171,1062 gpos: 491,1192 delta: 49 orientation: V " "[ ] Wheel btn: - btns: 0 pos: 171,1062 gpos: 491,1192 delta: 53 orientation: V " "[ ] Wheel btn: - btns: 0 pos: 171,1062 gpos: 491,1192 delta: 49 orientation: V " "[ ] Wheel btn: - btns: 0 pos: 171,1062 gpos: 491,1192 delta: 53 orientation: V " "[ ] Wheel btn: - btns: 0 pos: 171,1062 gpos: 491,1192 delta: 53 orientation: V " "[ ] Wheel btn: - btns: 0 pos: 171,1062 gpos: 491,1192 delta: 58 orientation: V " "[ ] Wheel btn: - btns: 0 pos: 171,1062 gpos: 491,1192 delta: 53 orientation: V " "[ ] Wheel btn: - btns: 0 pos: 171,1062 gpos: 491,1192 delta: 58 orientation: V " "[ ] Wheel btn: - btns: 0 pos: 171,1062 gpos: 491,1192 delta: 53 orientation: V " "[ ] Wheel btn: - btns: 0 pos: 171,1062 gpos: 491,1192 delta: 58 orientation: V " "[ ] Wheel btn: - btns: 0 pos: 171,1062 gpos: 491,1192 delta: 53 orientation: V " "[ ] Wheel btn: - btns: 0 pos: 171,1062 gpos: 491,1192 delta: 49 orientation: V " "[ ] Wheel btn: - btns: 0 pos: 171,1062 gpos: 491,1192 delta: 34 orientation: V " "[ ] Wheel btn: - btns: 0 pos: 171,1062 gpos: 491,1192 delta: 4 orientation: V " "[ ] Wheel btn: - btns: 0 pos: 171,1062 gpos: 491,1192 delta: -9 orientation: V " "[ ] Wheel btn: - btns: 0 pos: 171,1062 gpos: 491,1192 delta: -4 orientation: V " "[ ] Wheel btn: - btns: 0 pos: 171,1062 gpos: 491,1192 delta: -1 orientation: V " ((Having earlier identified the "e" key as the one it thinks is pressed (due to the ShortcutOverride log entry identified above), I hit that key. Nothing appears in the log.)) ((I then try the 4 and 6 keys again, and this time they work, with the following log entries.)) "[ ] ShortcutOverride key: 0x34 mod: 0x0 text: 4 autorepeat: 0" "[ ] KeyRelease key: 0x34 mod: 0x0 text: 4 autorepeat: 0" "[ ] ShortcutOverride key: 0x36 mod: 0x0 text: 6 autorepeat: 0" "[ ] KeyRelease key: 0x36 mod: 0x0 text: 6 autorepeat: 0" STEPS TO REPRODUCE 1. Start Krita (and optionally turn on Tablet Event Logging) and open an image. 2. Switch to a non-Krita window and input something into it. 3. Switch back to Krita and attempt to use any canvas shortcuts. OBSERVED RESULT Canvas shortcuts fail to work. If Tablet Event Logging is on, one or more spurious ShortcutOverride key entries will appear, corresponding to some of the keys that were used to input into the non-Krita window. EXPECTED RESULT Canvas shortcuts consistently work without picking up phantom ShortcutOverride key events from other windows (or however the heck it's finding them). SOFTWARE/OS VERSIONS Windows 11 I have reproduced this with Krita 5.0.6, Krita 5.1.1, and Krita 5.1.3, with both upgrades and clean reinstalls. ADDITIONAL INFORMATION * I have observed this "stuck keys" phenomenon seemingly persist between application restarts. (Either that or it's picking up phantom events as part of the startup process as well. I have been unable to ascertain which.) * This does not appear to be dependent on if any given part of the Krita window is hovered over with the mouse pointer while working in the other window. (Indeed, I have no idea what got it started). * This ONLY applies to canvas shortcuts as defined in the Canvas Input Settings portion of the Krita preferences window; other shortcuts (such as tool selection shortcuts and menu shortcuts) continue to work just fine.
Hi, Jo Valentine! Do you have any accessibility system running on your system? Or some custom input system support, like traditional Chinese? On every focus-in event Krita asks the system about the currently pressed keys and it seems OS reports 'e' key pressed for some reason. Does the problem happens with GVim only or with other applications as well?
Setting to needsinfo
(In reply to Dmitry Kazakov from comment #1) > Hi, Jo Valentine! > > Do you have any accessibility system running on your system? Or some custom > input system support, like traditional Chinese? On every focus-in event > Krita asks the system about the currently pressed keys and it seems OS > reports 'e' key pressed for some reason. > > Does the problem happens with GVim only or with other applications as well? Happens with other applications as well. I have no custom input systems running that I am aware of. I do have one program that modifies input - it's called W10Wheel.NET, and it enables simultaneous use of the middle mouse button as its own button and (when held down and the mouse is moved) as a "scroll wheel". I had ruled out that program out as a factor, however, because 1) it does not generate keyboard inputs, just mouse wheel, and 2) I have reproduced this bug when it is disabled and when it is not running at all. I should note also that it's not just the "e" key; that was one example. This morning just now, for example it was the keys 0 and t: "[ ] Enter " "[ ] FocusIn " "[ ] ShortcutOverride key: 0x30 mod: 0x0 text: none autorepeat: 0" "[ ] ShortcutOverride key: 0x54 mod: 0x0 text: none autorepeat: 0" "[ ] ShortcutOverride key: 0x30 mod: 0x0 text: 0 autorepeat: 0" Hope this helps!
Thanks for your comment! Automatically switching the status of this bug to REPORTED so that the KDE team knows that the bug is ready to get confirmed. In the future you may also do this yourself when providing needed information.
Hi, Jo Valentine! Could you please test the latest nightly builds of Krita if this bug is still actual? We had multiple attempts to fix bugs like that since then https://binary-factory.kde.org/job/Krita_Nightly_Windows_Build/
Haven't tried one of those builds, but I have version 5.2.1 here and am no longer experiencing the bug. At the very least I can't reproduce it anymore using the approach described earlier.
https://blogs.kde.org/2024/01/30/farewell-binary-factory-add-craft-jobs-your-apps-kdes-gitlab-now/ https://invent.kde.org/graphics/krita/-/jobs
1. How do you switch between Krita and other text editors? mouse click the app icon in task bar, or Win+Tab, etc? 2. Which Canvas Shortcuts don't work? give an example? Thanks.
(In reply to Liang Qi from comment #9) > 1. How do you switch between Krita and other text editors? mouse click the > app icon in task bar, or Win+Tab, etc? > 2. Which Canvas Shortcuts don't work? give an example? > > Thanks. At the time, any means of switching windows seemed to trigger it, although I most commonly used either Alt-Tab, or the F10 key (which I have mapped to launch a new gvim window). And when it occurred, no shortcuts appeared to work - an example would be the 6 and 4 keys to rotate the canvas or use of the mousewheel to zoom in and out, as illustrated in the original report. That said, I haven't been able to reproduce this issue in over a year (yay!) so I'm having to go by distant memory... :) Hope this helps.