Skip to content

Set an earmark instead of the value if earmark picker is active

shak-mar requested to merge shak-mar/gnome-sudoku:master into master

If you left-click, a value picker opens; if you right-click, an earmark picker opens. Let's call the resulting states "value mode" and "earmark mode".

Before this commit, this was the mapping from user input to action:

                                value mode                  earmark mode
------------------------------------------------------------------------
click number                    set value                   set earmark
press (keyboard) number         set value                   *set value*
ctrl-press (keyboard) number    set earmark                 set earmark

This commit changes the entry marked with *stars* to become "set earmark": If the user right-clicked to enter earmark mode, pressing a number should set an earmark.

Note that I do not propose to change the "set earmark" in value mode if the user presses control: In that case, the explicit (because ctrl is pressed) intent of the user is to set an earmark.

This enables a hybrid mouse-keyboard usage of the application: Use the mouse to select which cell you want to edit (faster than arrow keys), and use the keypad on your keyboard to select which number you want to put there (faster than clicking the number).

Previously, if you wanted to select a cell with the mouse and then set an earmark, you would need to press control on the keyboard too, which is very uncomfortable.

Edited by shak-mar

Merge request reports