drawpile / Drawpile

A collaborative drawing program
http://drawpile.net/
GNU General Public License v3.0
1.04k stars 131 forks source link

Spinner sliders grab keyboard focus too eagerly #1390

Open incoheart opened 3 hours ago

incoheart commented 3 hours ago

When I am changing the opacity of a layer with the mouse (which I think is the only way to change the opacity of a layer), the bar is set to active in a way that doesn't allow me to do canvas modifying shortcuts like New Layer (which I have set to Insert, the default), or Delete Layer (Delete), or Change Layer Properties (F2).

I just noticed that on the num pad Insert, Delete, Pg Up (on number 9), Pg Dn (on number 3), work to modify the layers as they are assigned, but not the Insert+ Home + Delete + End Pg Up + Pg Dn I normally use. It seems that a lot of the keyboard keys used for drawing have a different shortcut assignment mode enabled when the layer opacity is being modified.

This is a problem for me because I have to click out onto the user interface in order to do some layer modifications.

A solution would be 1) adding Esc to deselect the opacity bar active mode, which I use often in GIMP to escape an editting mode. Another solution 2) would be opening up more keys to be used while the opacity bar is active, excluding numbers, arrows, Pg Up, and Pg Dn.

After mentioning my first solution, I have a feature request. Add two shortcuts to modify the layer opacity: an increment in one direction, and another shortcut to increment in the other direction. This would switch to the opacity mode like clicking on the opacity bar normally does, and then add in the Esc accessibility feature I suggested in my first solution to switch off the opacity modification mode.

I know I'm nitpicking, but this issue was interrupting my workflow as I often lower opacity and then press Insert to proceed to the next sketch on top of the reduced opacity layer. Adding an Esc accesibility feature to deslect would be an intuitive solution for people who like to stick to their keyboards while drawing.

askmeaboutlo0m commented 2 hours ago

Yeah, this is one of the general issues that these spinner sliders from Krita have, it's not exclusive to the opacity slider. They are also pretty unpredictable with regards to when they enter into edit mode, which is particularly annoying on devices where you only got a pen and no physical keyboard, so whenever they decide to enter edit mode it pops up a virtual keyboard.

One solution floated was to make double-clicking enter into edit mode and have the sliders not take keyboard focus or enter edit mode otherwise. I think letting you hit escape to get out of them also makes sense, it doesn't really make much sense that it just eats the input and retains focus currently. Making more keys accessible is trickier, since it's OS- and language-specific how those behave. For example, on Windows the Insert key has (or should have) the effect of switching between insert and replace mode when typing.

Shortcuts for layer opacity would be reasonably easy to add, but every other slider still has the aforementioned isuses.

Currently, you can work around it by moving your mouse over the canvas or hitting Alt twice, because that will make it grab the input focus instead of the slider.