If I click away from Krita my shortcuts break [5.1.1]

Even if the window I click on is the “Configure Krita” menu, when I click back to the canvas my shortcuts are broken. The only shortcuts that seem to work are tools, brush preset switching, and plugins. Occasionally when I refocus on krita the canvas might rotate in a bit.

I know no one has a fix.

I like krita but it’s become too disruptive having to restart krita this frequently. I’ve seen this issue reported often enough and it seems like an older bug. I’m assuming it’s too complicated to put resources into fixing. Does anyone know what the problem is at least? I’m curious to learn about it.

2 Likes

What do you mean by ‘shortcuts’?
Do you mean the keyboard key combinations that you press to make a particular thing happen?

Can you give links to where you’ve seen this reported before?

1 Like

I’m having a similar issue that crops up several dozen times a session, I have no idea what causes it.
Randomly, a lot but not all of my shortcuts just stop working entirely. It isn’t until I click around in the layers panel or canvas do I suddenly get functionality back. I’ve tried to record it or reproduce it or pay close attention to what could be causing it, but no luck so far so I haven’t reported it because the bug report would be rather useless detail-wise.

The problem will usually look something like:

  • Drawing
  • Hold z and drag to quick zoom out
  • End up drawing a line instead
  • Try again, draw another line
  • Try to pan, draws another line.
  • Click around in the layer panel, switching layers a bit
  • Try to zoom again, draw a line.
  • Try to zoom again, it finally zooms
  • Everything works normally now

Does this happen with the mouse and the stylus or just with one of them?

combinations and single hotkeys, including those for navigation and brush size. It happens with both mouse and stylus.

It happens when I focus on a different window or minimize krita. The pop up palette stops appearing as well.
The workarounds I’ve seen did not work for me.

exact same issue I think:

https://www.reddit.com/r/krita/comments/vtstpb/shortcuts_stop_working/

older versions:
Navigation shortcuts aren't working anymore (same issue, older version)
Modifiers stop working after some time (+ how to make Krita remember the brush size)

similar bugs but different causes—apparently it’s among many “focus issues”:

This bug has been reported in the formal bug reporting system.
Sadly, it seems to be very difficult to trace the cause of it and find a fix for it.
Even more confusing and difficult is that it doesn’t happen to everyone, even with the same version of krita and the same operating system.

I never use Krita with the mouse so I don’t know. I’ll keep trying to figure out the cause, but so far it’s seemingly random. I felt like it happened more on larger canvases (15k+ 16 bit) but I give it a 95% chance that’s coincidence.

1 Like

This topic was automatically closed 15 days after the last reply. New replies are no longer allowed.

This topic has discussed the issue in detail.
I accidentally find an inelegant way to bypass it, so I write this in case someone in the future struggles with it.

  • Install YetAnotherKeyDisplayer from github.
  • Open it.
  • Now, hotkeys should no longer stop.

This seems to be a window focus issue, maybe other program with overlay also works.
Hope we can fix it in the future.

1 Like

Thank you for reporting this!

@raghukamath, @AhabGreybeard, @sooz do you think this should/could be added to the topic @SevenL refers too? →

Michelist

2 Likes

I merged it here.

3 Likes

Ok, I seem to have found the root of this problem, not the window focus, but the unreleased key.
The unreleased key was not caused by krita, but some other programs. Unfortunately, this will cause
the shortcuts of krita to stop working.
To reproduce, press and hold any unbound key of krita. At this time, RMB, MMB, and some other shortcuts with modifier will fail to work.
It’s not krita’s fault, but I tested some other programs like blender, photoshop, chrome and they all seem to ignore the unbound keys, which allows their shortcuts to work properly, that’s why this issue is so insidious.
So, is this a problem worth solving? :thinking:

1 Like

Do you know which other programs and why/how they do that?

In my case, the program causing the problem is WeChat PC client, a chat application developed by Tencent. It has a very strange behavior, after logging in it will press the virtual key F22 and will not release. I didn’t realize it until today when I was using YetAnotherKeyDisplayer.

If you kill the WeChat PC client, does that stop the problem in krita?

That’s something for the developers to scratch their heads about.

I tried it, killing WeChat does not release F22 key. I don’t understand either, maybe they’re doing something weird with the keys? I just filed a bug report with them and don’t know if there will be a response.

3 Likes

I greatly appreciate your method for solving this issue which has been confusing me for over half a year, while it only works for a week😨. Recently YAKD only works while I click on the YAKD window and float my cursor over krita for scrolling, but fails everytime when I click back to krita.
So I have to continue resisting from clicking away from krita while I’m painting😫

YAKD will force release all unreleased keys when you run it, that’s why it can solve the issue. However, if a program stuck some key after you start YAKD, you have to close YAKD and run it again. (Yes, all we need is the by-product of its startup :wink:)

That should be enough. If that doesn’t help, then it might be something different… :smiling_face_with_tear:

1 Like

In my test, I think the issue is caused by some apps aggressively stealing focus from Krita. Krita only loses canvas input of modifier keys and middle/right buttons. Single key shortcuts (B/E/R/V), non canvas shortcuts (Ctrl+S) are not affected.

I was able to observe this issue only with newer versions of Sogou Pinyin (搜狗拼音输入法) under certain conditions.

I have reported my findings in: 483687 – [Windows] Krita loses modifier and mouse click canvas input due to certain apps aggressively stealing focus

4 Likes