Alt+left/right should remember last selection

• Jul 17, 2019 - 03:50
Reported version
3.2
Priority
P1 - High
Type
Ergonomical (UX)
Frequency
Once
Severity
S5 - Suggestion
Reproducibility
Always
Status
closed
Regression
No
Workaround
No
Project

1) score with some notes
2) select a note other than the first
3) press Esc to deselect
4) press Alt+Right

Result: first element of score is selected, when it would be better if we remember the element most recently selected and simply continued navigation from there. This would be excellent protection against inadvertently losing the selection, very important for blind users unable to re-establish the previous selection any other way.


Comments

Not sure the new behaviour is expected. Can you provide the links to related guidelines?

Losing selection by clicking Esc makes sense. What is another way to start iteration over elements from the beginning of the score? Can we suppress Esc as an operation which loses selection for the ones using accessibility features? I'm not experienced at all at the topic of accessibility, that's why I'm asking a lot of questions, sorry. There should be arguments for and against the decision, guidelines, discussions, articles, something that confirms or refutes the suggestion.

I appreciate the questions and opportunity to discuss!

With my change, pressing Esc does still lose the selection. The only difference is that either Alt+Left or Alt+Right will get it back. So it's still the case that after pressing Esc, press Delete, for instance, does nothing And it's still the case that you can get back to the beginning of the score by pressing Ctrl+Home. Someone not using Alt+Left/Right won't see any difference in behavior; no other commands attempt to restore the selection.

The reason for the change it is that it is easy to accidentally press Esc and lose your selection, which for a sighted person is only a minor annoyance, but for a blind person is much more frustrating as it becomes very difficult to get back to where you were in navigation. This is something that constantly comes up in accessibility reviews, and we've fixed quite a few bugs over the years with selection getting lost specifically because of accessibility concerns.

While it would theoretically be possible to prevent Esc from losing the selection if Qt reports that an accessibiity device such as a screenreader is being used, that's not really idea, as not all people who might benefit from this would be using such devices (eg, people who can see but have mobility issues preventing use of a mouse). And while I've fixed the more obvious cases where selection was lost accidentally, there are almost certainly others, so we really need a strategy for recovering selection.. This fix improves life for blind users significantly while not affecting the behavior of any commands except Alt+Left/Right.

In reply to by Marc Sabatella

I strongly support the idea of Marc here and find it very useful for not blind users as well.
So it should certainly not be limited to cases where accessibily device is detected.
I don't find the fact that esc followed by alt right doesn't go to begin of score annoying by any mean. If you want to go to begin of score, esc is certainly not a natural way to do it anyway, while ctrl home is.

Priority P2 - Medium P1 - High

Thanks for the feedback! My suspicion is most sighted users have no idea that Alt+left/right exist, so most people won't notice a change, but for those few who do rely on Alt+left/right to gain more keyboard control and to reduce reliance on the mouse, the change will simply be welcome. For blind users, though, it's pretty much essential.

I agree with @Marc Sabatella on this, though I do see why @Anatoly-os felt the need to ask as it is not obvious at first. You can think of Esc as being a way to exit "edit mode" and enter "view mode", but when you return again to edit mode you will still want the same element to be selected as before.

The same should probably be true for plain Left and Right as well as Alt+Left and Alt+Right.

I agree with shoogle and would go so far as to say that pressing esc should always leave MuseScore knowing what was last selected unless a new item is clicked.

With my implementation, pressing Esc does always remembers the last selected element. And it would also be remembered any other time the selection is accidentally lost (although of course if there are such bugs remaining, I'd like to fix them too).

But currently, in my PR, the only way to regain the remembered selection is to use Alt+left/right. The behavior using plain left/right is not changed. I did that to avoid complaints that we changed behavior for no reason. Also, for example, I could imagine us someday implementing left/right in normal mode with no selection as a way of moving the canvas.

But anyhow, it's simple enough to add similar logic to ordinary left/right commands. or add a new command whose function is to restore the last selection (and perhaps do a full read on the localtion - see #293301: Add accessibility command to force full read of current location). But there is no hurry on any of that to me. What's near-critical is making sure Alt+left/right always do something reasonable, and my PR accomplishes that.

Status PR created fixed

Fixed in branch master, commit 3feb03e11f

_fix #292269: remember last selection for alt+left/right

This change adds code to track the current tick and track on every new single selection.
If the selection is ever lost (including by pressing Esc),
then a currentCR can be constructed from this when the user resumes navigation via Alt+left/right._

Fix version
3.3.0