Up/down arrow keys in first/last line of text don't go to beginning/end

• Jan 5, 2018 - 18:09
Reported version
2.1
Type
Functional
Severity
3
Status
closed
Project

When the cursor is in the last line of a document or text box, standard behavior (at least on macOS) is that pressing the down arrow key moves the cursor to the end of the line. Similarly, when the cursor is in the first line, the up arrow key moves the cursor to the beginning of the line. This does not occur in MuseScore 2.1 or current development versions.

Multi-line text is not working at all in master currently, but as far as I can tell this fixes the editing behavior to match most macOS apps: https://github.com/IsaacWeiss/MuseScore/commit/4fdcc1b32f60255c86d20076… However, it does not seem to affect text editing in e.g. Format / General Style / Header, Footer. Feedback appreciated.


Comments

I tried on Windows, Chrome has the same behavior than Mac but Internet Explorer doesn't.
Qt doesn't have the behavior on any platform. If we merge this PR, the behavior in the score texts will be different than in text areas in the UI. We don't have many text areas in the UI though... So I guess we can just merge this PR. Any other opinions?

I'm still on Mac only, but some further notes:

  • Single-line text areas in MuseScore already do work this way (e.g. the fields in Score Properties).
  • LibreOffice does not behave this way (though I think it should).
  • Given the discrepancy it would create between text elements in the score and Qt's multi-line text areas, I sort of regard this as a work in progress until they can be made consistent (perhaps even with conditions to use different behavior on different platforms?)—but since I can't figure out how to do that and there is already a discrepancy between single-line and multi-line text areas in the UI, this is no less appealing than the present situation.

Currentlt, when you want to go to the first line without going to the first character you can just press the up key several times without having to be careful to not press it too many times. You can even let the key pressed down on the keyboard until you see on the screen that the cursor is on top.
-This facility would be lost (you would go at the beginning of the text instead of staying in the line)
-If what you need to do is going begin of the text ctrl+home (should) do the job in one step (or just home is enough if you are already on the first line)
-MS-Office doens't behave like that.
So for all these reasons implementing it is a bad idea for me.

In reply to by Isaac Weiss

@Isaac,
It certainly does on for Windows.
Note that I don't know the standard (if any exists) behaviour on Mac, so I can't help to make the correct decision for Mac.
Just a question: when clear standard behaviours exist and are different on Windows / Mac / Linux, I don't know if the design strategy of MuseScore is [A] to try to behave the same way on the three OS ignoring the specifics, or [B] to adapt to each OS and behave in a different ways on each?
If it is [A] then making this change for Mac only is inconsistent with the strategy.

I know various items in the menus are placed differently according to the OS. And this is certainly the standard behavior for text editing on Mac.