Is there any way to change the behaviour of "hold to invoke" type shortcuts to toggle instead?

This is really stupid but I can’t figure out how to make the straight line tool actually stay selected when using the freehand brush tool.

I changed the line tool shortcut to V in the keyboard shortcuts but it still just switches back to the freehand tool the moment I let go of V.

The reason I want to change it is because it’s really awkward to use the Shift + V shortcut to make the line at fixed increments with my right hand. I think it would be easier for me if the V key was a toggle just like the B key is for freehand brushes.

Curiously, when I hover the pointer over the tool tray, then pressing V actually does toggle the selected tool to the line tool instead of quick switching it, but when I hover the pointer over the canvas it goes back to the old behaviour! I generally don’t have the tool bar docker visible because I use keyboard shortcuts for all the other tools, and I don’t want to have it up just for this one thing!

Is there a setting or something that I am missing?

V is a Canvas Input Setting, so the Keyboard Shortcut for the line tool and the Canvas Input Setting are fighting with each other. It’s in the Tool Invocation category. Change it in either of the places to be something else and it will start working. Though a Keyboard Shortcut won’t be a toggle but just a switch to the Line Tool, then you’ll have to press B to return to the Freehand Brush Tool.

2 Likes

I have a suggestion, which I know works because I’ve tried it:

Keep the ‘V’ key as a keyboard shortcut to select the Line Tool then ‘V’ and ‘B’ can be used to select between Line Tool and Freehand Brush Tool.

Go to Settings → Configure Krita → Canvas Input Settings → expand the Tool Invocation group.
You’ll see an entry of: Mouse Button - V + Left Button - Activate Line Tool.
Double-Click on ‘Z + Left Button’ and that will open a small Edit Mouse Input window.
Click on the ‘V’ so it says ‘Input’ and then press the ‘Z’ key.
That will change that setting to ‘Z + Left Button’. Press OK.

That will mean you can use the ‘Z’ key instead of the ‘V’ key for temporary use of the Line Tool and that should be easier to use with your right hand.
You could use the ‘\’ key which would be even easier but then you’d have to change the existing keyboard shortcut that uses ‘\’ to stop them fighting with each other. It’s up to you.
(Edit: Last sentence corrected - changed ‘/’ to ‘\’)

Note: If you try to use a canvas input setting that is already in use as a canvas input setting, you will be warned about that but not told where it is in use. You will not be warned of any clashes with existing keyboard shortcuts.
If you try to use a keyboard shortcut setting that is already in use in the keyboard shortcuts, you will be warned and told where it is and given an opportunity to change it. You will not be warned of any clashes with existing canvas input settings.
It’s how it is because of various complications.

Warning: At the moment, there seems to be a problem with making changes to the default canvas input settings and keyboard shortcuts. If you do make changes, you need to press the OK button and then Quit krita and restart it for those changes to take effect.
That is my observation with the 5.2.15 appimage and a recent 5.3.0-prealpha.
I haven’t tried the latest 5.4.0-prealpha yet.

1 Like

Thank you both for the reply! I didn’t know about the second options menu for canvas input settings!

I just removed the line tool from the menu by right click and deleting it. Now it lets me actually switch to the line tool! I probably should have used a different word than “toggle”, I meant that I wanted the active tool to switch to the line tool permanently instead of only temporarily while holding down the button!

I have Z already bound to undo. I remapped like almost all of my keys (at least he ones I use most) to be single key presses instead of of multi-key like Ctrl + Z.

The setting seems to applied no problem on my version, but I’ll keep that in mind if I get this issue in the future!

Thank you both!

You could try using ‘\’ as I suggested. That would reduce the stress on your right hand?

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