Bug 459305 - Krita 5.1: Canvas Input selection tools (and others) set to modifier keys (ctrl, shift & alt) do not respond as expected.
Summary: Krita 5.1: Canvas Input selection tools (and others) set to modifier keys (ct...
Status: RESOLVED WORKSFORME
Alias: None
Product: krita
Classification: Applications
Component: Shortcuts and Canvas Input Settings (show other bugs)
Version: 5.1.1
Platform: Microsoft Windows Microsoft Windows
: NOR normal
Target Milestone: ---
Assignee: Krita Bugs
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2022-09-18 01:20 UTC by Scroptels Gluzar
Modified: 2023-12-27 03:46 UTC (History)
6 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 Scroptels Gluzar 2022-09-18 01:20:54 UTC
SUMMARY
The canvas input settings give you the option to quickly change to one tool by just pressing and holding a key, and once released it changes back to the tool you were using previously. This made it possible to map selection tools to each modifier key such as shift, for example, and automatically add to a selection, or if mapped to alt, you could subtract from the selection.

However in krita 5.1 and 5.1.1 there's an issue with these tools that they don't seem to "read" the modifier key as they did previously, instead they get "locked" to a single mode like "replace" no matter what key is pressed (ctrl, shift or alt). 

STEPS TO REPRODUCE
1. In Canvas Input settings, map any of the selection tools (freehand selection for example) to each of the modifier keys. ctrl, shift and alt.
2. Start making selections by holding the modifier key and drawing them with the pen or mouse.
3. Try using the other modifier keys to make selections.

OBSERVED RESULT
You'll likely find you've replaced the previous selection with a new one. You may also notice a little stutter with the tool while making selections this way.

From my testing i found a way to make the tool "read" the modifier key.
By holding down a modifier key such as ctrl and start drawing a selection, then while holding down on the tablet/mouse, releasing the key and press and hold another, in the case of alt it will cause the tool to start subtracting from then on, shift will make it start adding, ctrl will set the tool to "replace" selections every time.

EXPECTED RESULT
On krita 5.0.2 to 5.0.6 using these tools under canvas input with the modifier keys was easy and fluid. There was no stuttering, i could make selections and modify them very fast without having to switch my main tool. I believe these problems affect all other tools under canvas input, rectangle and ellipse shape tools also behave differently from before, previously if set to the ctrl key they would expand from the center instead of a corner, now they expand from a corner point, other tools may not be affected, they would need to be tested further.

Another observation i had is that while making selections with the freehand selection tool the like will flicker, this did not happen in krita 5.0.2, it could be related or a different issue.

SOFTWARE/OS VERSIONS
Windows: Windows 10
macOS: 
Linux/KDE Plasma: 
(available in About System)
KDE Plasma Version: 
KDE Frameworks Version: 
Qt Version: 

ADDITIONAL INFORMATION
Comment 1 tomtomtomreportingin 2022-09-18 01:41:39 UTC
Very interesting... Binding modifiers to activate specific selection modes instead of the general tool was not a trick I was aware of until now. I'm not even sure if this trick can be considered "officially supported".

But regardless, on Linux, I can not reproduce the issue you're having. Shift and alt work fine for adding and subtracting the selection, in regards to specifically setting them to the freehand selection canvas input.  Someone on Windows could try reproducing this, since modifiers likely work differently in that case.
Comment 2 Scroptels Gluzar 2022-09-18 07:37:00 UTC
Guess we'll need other Windows users to test it. I thought it may be an issue of my own computer, but testing it with different versions of Krita 5 I saw it was only a problem from krita 5.1 and onwards, so i figured it must be the software instead, it could still be on my end though, idk.

It's yet another extremely specific thing that maybe only I in the whole world uses. It may be unintended, but i do use it a lot so I'm gonna stick to using 5.0.6 despite the new improvements.
Comment 3 Hologram 2022-09-23 09:48:23 UTC
This doesn't look like any behaviour that would be expected by a user. 

I have the Shift key assigned to the line tool, Ctrl key to the move tool and Alt to the Colour picker in the Canvas input settings to mimic what I am used to from Photoshop. However, if you do that your are not able to add/ subtract from selections by holding modifier keys at all. That's why I opened a feature request on this for selection in particular: https://krita-artists.org/t/selection-modifiers-to-add-subtract-from-selection-as-dedicated-canvas-input-settings/47588
Comment 4 Deif Lou 2022-10-08 10:50:10 UTC
I made a workaround for other unrelated issue: https://invent.kde.org/graphics/krita/-/merge_requests/1610
And it seems it also solved this issue. Please check krita plus or next and test.
Comment 5 Halla Rempt 2022-10-08 12:47:57 UTC
Setting to needsinfo
Comment 6 Scroptels Gluzar 2022-10-11 20:00:14 UTC
(In reply to Deif Lou from comment #4)
> I made a workaround for other unrelated issue:
> https://invent.kde.org/graphics/krita/-/merge_requests/1610
> And it seems it also solved this issue. Please check krita plus or next and
> test.

Hi Deif, I've been checking out the latest krita plus releases. It seems the issue was mostly solved, but not entirely. I can finally add and subtract with the canvas input selection tools and modifier keys.

However there's still a slight stuttering when modifing selections, specially if they are big. It's probably more of an issue with selections in general in Krita 5.1 since i notice the same stuttering while using the freehand selection tool to make selections. In general selection tools in Krita 5.1 are just not as fluid and fast like they were in krita 5.

The shape tools (rectangle shape & ellipse shape) work well now too, they are fluid and fast. Though creating a shape with the modifier keys (SHIFT, ALT, CTRL) no longer affect the shape when it is drawn unless the key it's released and pressed again. I think i prefer that however, this way if i press ctrl and draw a shape the origin will be at the corner instead of expanding from the center, but that's up to personal preference.

Anyway, I think it's good enough for me to work with it now, maybe you can call it fixed, though it does need to reduce the suttering of selections.
Comment 7 Deif Lou 2022-10-11 20:34:25 UTC
Hi. Can you specify in more detail what you mean with "stuttering"?
Comment 8 Scroptels Gluzar 2022-10-11 21:51:27 UTC
(In reply to Deif Lou from comment #7)
> Hi. Can you specify in more detail what you mean with "stuttering"?

Hi, sorry i'm not native english speaker, maybe i'm using the wrong word.

I mean that when i draw a selection and then release my pen, there's a few seconds of nothing happening between when i release my pen and when i see the selection i drew activate on the canvas. The same delay happens if i modify the selection by subtracting or adding to the selection (or any other selection mode). This is a problem when making multiple selections really fast as they don't appear until you stop for a while. I'm also seeing the size of the selection drawn doesn't matter, the same delay it's present regardless of the selection size.

On krita 5.0.6 the delay (if there is any) is completly unnoticeable to me, but on Krita 5.1 It's very noticeable.

I don't think this problem related to the canvas input issue i had, just an issue with selections over all.
Comment 9 Bug Janitor Service 2022-10-12 04:55:31 UTC
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.
Comment 10 Halcyoen 2022-10-25 12:32:02 UTC
i can confirm this happening on latest kde neon along with a few other funny behaviors. note that i am using the "photoshop compatible" canvas input scheme which is a lot more reliant on the alt key.

- holding the cursor still and pressing the alt key once will seemingly toggle the brush outline to be hidden
- canvas inputs using the alt key will stop working if:
    - while the outline is hidden (see above), you hold alt and left click (invoke the color sampler) 
    - you press ctrl+alt on their own
    - if you switch layers and press the alt key

i am not experiencing the same same issues on Windows 10
Comment 11 Deif Lou 2022-10-25 13:43:58 UTC
Halcyoen, what version are you using? Have you tried the last nightly build to see if my changes solve the issue?
Comment 12 Halcyoen 2022-10-25 14:49:26 UTC
(In reply to Deif Lou from comment #11)
> Halcyoen, what version are you using? Have you tried the last nightly build
> to see if my changes solve the issue?

stable 5.1.1, and now i've also tried the krita next and krita plus builds from krita.org.
the issue unfortunately persists.
Comment 13 Deif Lou 2022-10-25 14:54:24 UTC
Halcyoen, just tu be sure, is your issue related to the selection tools or other tools? The change I did is only in the selection tools, so try those if you can and to see if the issue is solved there.
Comment 14 Halcyoen 2022-10-25 15:11:21 UTC
ah, my bad. no this is with other tools, such as the brush tool, shape tools, and bucket tool. the issue is however virtually the same as the original report; the alt key seemingly locking up and disabling itself temporarily.
Comment 15 Dmitry Kazakov 2023-11-12 14:06:16 UTC
Hm... do I understand it right that you are just trying to bind a **selection tool** to the keyboard modifier? That sounds like something we never planned to support and I'm not sure it is technically feasible.

If not, could you make screen recording of the issue?
Comment 16 Bug Janitor Service 2023-11-27 03:45:45 UTC
Dear Bug Submitter,

This bug has been in NEEDSINFO status with no change for at least
15 days. Please provide the requested information as soon as
possible and set the bug status as REPORTED. Due to regular bug
tracker maintenance, if the bug is still in NEEDSINFO status with
no change in 30 days the bug will be closed as RESOLVED > WORKSFORME
due to lack of needed information.

For more information about our bug triaging procedures please read the
wiki located here:
https://community.kde.org/Guidelines_and_HOWTOs/Bug_triaging

If you have already provided the requested information, please
mark the bug as REPORTED so that the KDE team knows that the bug is
ready to be confirmed.

Thank you for helping us make KDE software even better for everyone!
Comment 17 Hologram 2023-11-27 11:15:59 UTC
Not sure I understand the issue correctly, but my impression is that the OP talked about being able to change the selection tool modes (the buttons with the "action" label in the tool docker for add, subtract, replace, intersect and symmetric difference) by pressing modifier keys. In the Canvas Input Settings for Krita 5.3 pre-alpha, I don't see any options to that affect selection methods, only tool activations. 

I'm not sure whether Krita had the selection tool methods hardcoded at first, I simply don't recall the behaviour anymore. But I know I was once under the impression that you could hold Ctrl to add to the selection and Alt to subtract or something of that nature. Now, if you map the move tool invocation to Ctrl + Left Mouse in the canvas input settings, this would disable selection mode changes if a selection tool is active. But perhaps this is better suited for a new feature request if this was never intentional.
Comment 18 Bug Janitor Service 2023-12-12 03:45:53 UTC
Dear Bug Submitter,

This bug has been in NEEDSINFO status with no change for at least
15 days. Please provide the requested information as soon as
possible and set the bug status as REPORTED. Due to regular bug
tracker maintenance, if the bug is still in NEEDSINFO status with
no change in 30 days the bug will be closed as RESOLVED > WORKSFORME
due to lack of needed information.

For more information about our bug triaging procedures please read the
wiki located here:
https://community.kde.org/Guidelines_and_HOWTOs/Bug_triaging

If you have already provided the requested information, please
mark the bug as REPORTED so that the KDE team knows that the bug is
ready to be confirmed.

Thank you for helping us make KDE software even better for everyone!
Comment 19 Bug Janitor Service 2023-12-27 03:46:31 UTC
This bug has been in NEEDSINFO status with no change for at least
30 days. The bug is now closed as RESOLVED > WORKSFORME
due to lack of needed information.

For more information about our bug triaging procedures please read the
wiki located here:
https://community.kde.org/Guidelines_and_HOWTOs/Bug_triaging

Thank you for helping us make KDE software even better for everyone!