Bug 387745 - Input methods break keyboard shortcut handling (Shift + Hold-Space (pan, etc.) controls)
Summary: Input methods break keyboard shortcut handling (Shift + Hold-Space (pan, etc....
Status: RESOLVED FIXED
Alias: None
Product: krita
Classification: Applications
Component: Shortcuts and Canvas Input Settings (other bugs)
Version First Reported In: 3.2.1
Platform: Microsoft Windows Microsoft Windows
: NOR normal
Target Milestone: ---
Assignee: Alvin Wong
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2017-12-09 16:19 UTC by remirosenthal
Modified: 2018-01-15 15:26 UTC (History)
2 users (show)

See Also:
Latest Commit:
Version Fixed/Implemented In:
Sentry Crash Report:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description remirosenthal 2017-12-09 16:19:59 UTC
On 3.3.2 as well.
When I press or hold shift it breaks the ability to use the space key with the mouse to pan, rotate or zoom, and vice versa. It acts as if I am not holding the modifier down.
It is usable again after focusing a different window, or switching brushes or layers. Sometimes ctrl breaks space as well.
Comment 1 Scott Petrovic 2017-12-09 17:07:02 UTC
Shift + Space is a shortcut for rotating the canvas. Could you clarify a little more?
Comment 2 remirosenthal 2017-12-09 19:33:37 UTC
(In reply to Scott Petrovic from comment #1)
> Shift + Space is a shortcut for rotating the canvas. Could you clarify a
> little more?

The moment I press down shift, it breaks rotating as well as panning and zooming. For example if I try to use shift + space while dragging with my pen, it will draw instead of rotating. I am likely to use shift to change the pen size or rotate which makes this a major problem.
Comment 3 Scott Petrovic 2017-12-10 00:45:55 UTC
You can't get to the rotation tool until you press shift, so I am not sure what you mean that it breaks it when you press it.

Are you simply saying that holding down Shift + Spacebar doesn't activate the rotation tool?

It seems to work on the version I am testing with. Maybe someone else can chime in and see if it is an issue for them
Comment 4 remirosenthal 2017-12-10 12:44:28 UTC
I have found what's causing the issue for me.
I apologise for not being able to explain this issue very well and for the narrow scope of the issue.
I have a second IME installed (Google Japanese Input to be specific) which unsurprisingly interferes with input into Krita. As long as you don't switch between keyboard languages while Krita is open, the behaviour won't occur.

If you still want to reproduce the issue then try downloading a Google Input tool then switch between inputs while Krita is open. In my case it seems using any Japanese input type except Direct Input causes all modifier keys (including shift, control and space) to no longer work even when switching back to the default keyboard.
Sorry to have raised an issue like this but hopefully what I've found will be of help to someone.
Comment 5 Scott Petrovic 2017-12-10 15:20:37 UTC
Ha. That is pretty interesting. We would have to try that out to see what it is doing to the inputs or how it is mapping buttons. 

Thanks for the information. That is quite helpful
Comment 6 Alvin Wong 2017-12-11 07:01:32 UTC
Well, the fact is that I've never have most keyboard shortcuts in Krita work properly when any IME is enabled, and some key combinations (esp. Ctrl + Space) are affected even when the IME is not enabled. And it's not an issue limited to just Krita, but also a bunch of other applications.

The thing is that IMEs get to process all keyboard inputs before applications can do anything with them; if the IMEs handled the keyboard inputs, they are passed to the application not as raw keyboard events, but only as IME composition events if it's composition related.

There probably is a way to disable the IME when the canvas is active, but we need to take care not to break any input fields and the text tools (though my impression is that IMEs do break the current text tools anyway).
Comment 7 Alvin Wong 2018-01-14 15:30:50 UTC
Git commit 2ab0991e2558c5421604244dfb280e43dec29f18 by Alvin Wong.
Committed on 14/01/2018 at 15:29.
Pushed by alvinwong into branch 'master'.

Disable input method on the canvas

It should be fine for 4.0 because the SVG text tool doesn't edit
directly on the canvas, unlike the old text tools.

M  +1    -1    libs/ui/canvas/kis_qpainter_canvas.cpp
M  +1    -1    libs/ui/opengl/kis_opengl_canvas2.cpp

https://commits.kde.org/krita/2ab0991e2558c5421604244dfb280e43dec29f18
Comment 8 Alvin Wong 2018-01-15 15:26:09 UTC
Hi, can you test the behaviour of the latest nightly (#36 krita-nightly-x64-v4.0.0.51-97-g2ab0991e25 or newer)? https://binary-factory.kde.org/job/Krita_Nightly_Build/