Add keyboard shortcut to toggle between "Refer only active layer" and "Refer visible Layers"

Self explanatory title, I should hope. :slight_smile:
Lately I find myself switching back and forth between these two modes ( “Refer only active layer” and “Refer visible Layers”) a lot more than I used to, and it’d be a tremendous workflow boost if I could have these options included in the keyboard shortcuts menu so I didn’t have to mouse over to this tiny dropdown menu and manually switch them with my mouse.

image

1 Like

have you tried to map that in the shortcuts?

Yes. I haven’t been able to find it. So either I’m miserably blind and/or incompetent, or it’s not actually in there lol.

According to C++ source code there is no way to control this Preference tool option (floodfill.refer_to) from keyboard shortcuts for now. I think it will be the best to add Preferences global / tool / document options control by name from keyboard shortcuts.

Like: <key preference="tool.floodfill.refer_to" action="enum_next" value="" shortcut="Ctrl+Shift+R" mac="Cmd+Shift+R" />

@dacap How do you think? Is GUI responsive enough to update on-the-fly from Preferences?

Hi there! :wave:

At the moment I think there is no way to change that with a command, but you can create a script like this:

And then associate a key to that script to switch the option.

It’s quite responsive (as preferences changes are observed), but in some cases the key will not work in some popups (like in this case because when the popup is open the key shortcut doesn’t work). But the option will be changed successfully if the shortcut/script is used without any popup opened.

2 Likes