Shortcut to turn off 'snap to assistants' momentarily

Hello everyone,
when I use the assistant tool (mainly the vanishing point) I also need to draw for a few moments with the snap off.
So I thought if it would be possible to add some shortcut to momentarily turn off the snap. Something that works the same way as the shortcut V (line tool). A shortcut that works as long as you keep it pressed (when you release the key the previous tool returns)
The ideal key for this hypothetical shortcut would be ALT, but the Z key looks OK too. I even set it to Z (to turn snap to assistants on and off) but you always have to press the key twice. One to turn on and one to turn off.

What do you think?

Thank you guys,

3 Likes

It does sound like a good idea.

Sadly, on my Debian MATE system, the Alt key is used at the system level to move application windows and this can’t be turned off, as far as I can tell.

EDIT:ADD After a bit of reading I’ve found it and changed it to Super(Windows).

However, the Alt key and Shift+Alt do not work properly in krita.
e.g. Alt does not give a forced subtraction of a selection even though the cursor indicates ‘-’ and Shift+Alt does nothing.
Ctrl and Shift do work.
Strangely, Ctrl+Alt forces a Symmetric Difference selection even though this does not have any modifier listed in the manual:
Selections — Krita Manual 5.2.0 documentation

I’ve looked in the Canvas Input Settings for clashes and can’t find anything.
Oh well, another mystery :woozy_face:

1 Like

As far as I know the gnome and KDE people moved this shortcut to the meta key. Perhaps we should file a report to mate to move this shortcut to meta key so that Alt key is free for the applications.

2 Likes

If you can assign a shortcut to it, perhaps the plugin for temporary tool invocation made by @wojtryb and presented in the course of this topic may be for you?

Michelist

2 Likes
  1. Download my plug-in (instructions in the plugin)
  2. Open krita resource folder in your file explorer (Settings > Manage Resources > Open resource folder)
  3. Open <resource folder>/pykrita/toolModifiers/importCode/passFunctions.py file with any text editor.
  4. Change both occurences of "erase_action" to "toggle_assistant" (lines 34 and 39)
  5. Restart krita and set a shortcut of Eraser (toggle) to z.

Works for me :wink: Then if you read this code a little bit, even without knowing much about python, maybe you could do it a little bit less hacky, with changing the name of action, or even making it as a separate one (how it should be done).

Good luck :slight_smile:

2 Likes

This sounds good, however I think I’d prefer a shortcut for temporarily enabling lock to assistants while a key is pressed. That would make it consistent with how the line drawing shortcut works.

1 Like

Oh, I actually haven’t seen that the original request was to turn it OFF, with ON being the deafult.
Here you go then:

@mmiller - you need a ‘not’ there

def toggleEraser(arg=None):
	Application.action("toggle_assistant").trigger()

def isEraserActive(arg=None):
	kritaEraserAction = Application.action("toggle_assistant")
	if not kritaEraserAction.isChecked():
		return True
	return False

@hulmanen

def toggleEraser(arg=None):
	Application.action("toggle_assistant").trigger()

def isEraserActive(arg=None):
	kritaEraserAction = Application.action("toggle_assistant")
	if kritaEraserAction.isChecked():
		return True
	return False

Function names makes absolutely no sense now, though, but otherwise some more changes in other files would be needed :wink:

4 Likes

Guys, thanks so much for the feedback.
I hope that other people can benefit from this help and this newest shortcut :slightly_smiling_face:

1 Like

Sorry for being off-topic.

It sounds like your problem is solved, is it :question:
I am happy for you if it is :exclamation:

Michelist

1 Like

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

In many canvas editing software, you can hold down a key while doing an operation to NOT have that operation honor snapping.

Today I have snapping on Image boundaries and midpoints enabled, but sometimes when I’m trying to do a polygon selection I can’t be accurate if that selection is near the middle of the image since there is a snap point at the midpoint. Just like with any other snapping, sometimes you actually need to position something or draw something that doesn’t honor snapping. Unfortunately there isn’t any hot key to tell the operation “don’t honor snapping”

Adding this hotkey would enable workflows to continue faster vs. having to stop the operation and goto the Snap-To options or Guide options to turn off… then restart the operation, then re-enable the snapping.

EDIT: I do see this request was filed back in 2021, but it doesn’t look like there was anything done except - you can write a script for it. “Shortcut to turn off ‘snap to assistants’ momentarily - Develop / Feature Requests - Krita Artists (krita-artists.org)(Shortcut to turn off 'snap to assistants' momentarily)”

1 Like

I just was annoyed by this too, a few days ago. Honestly, for me a disable all checkbox would be enough already (instead of disabling them manually one by one which is annoying since the menu closes every time). A shortcut would be even smoother.

Then I like to suggest combining/merging both requests. This assures a higher number of votes because they aren’t split over topic-borders, additionally it helps to concentrate all discussion and information about this topic in one place (topic).
Because you are stating yourself the requests are the same, I guess you are okay with it, @markri?

By the way, in case you got votes left, you should consider voting for your own feature request. You can cast your vote in your opening post on the left side of your headline.

@AhabGreybeard; @raghukamath; @sooz: I guess this topic should be merged with Shortcut to turn off ‘snap to assistants’ momentarily, because the topic starter considers it to be the identical request.

Michelist

4 Likes

Feel free to vote on this then, if you don’t mind!

-mark

2 Likes

@Takiro was the first who voted, and I got no votes left, unfortunately.

Michelist