-
Notifications
You must be signed in to change notification settings - Fork 2.6k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Dropdowns, menus and lists should highlight items in reaction to key presses ("Initial Letter Navigation") #16508
Comments
I agree. I also think you've basically designed it, so no input required from me. Let's do it! |
This comment was marked as off-topic.
This comment was marked as off-topic.
This comment was marked as off-topic.
This comment was marked as off-topic.
Really hope this one can be addressed as it is standard accessibility practice and makes a significant difference to productivity. Take for example adding the swing item from the tempo palette, currently that takes 31 down arrow presses to get to! |
This comment was marked as resolved.
This comment was marked as resolved.
This comment was marked as resolved.
This comment was marked as resolved.
This comment was marked as resolved.
This comment was marked as resolved.
Can I check whether the scope of this issue currently includes palette lists, and if not can that be added? |
I think this might be related - Currently screen reader is not announcing the Mnemonic Shortcut options in menus. So for example in the File menu if you arrow down to Open it just says "Open Ctrl O" but would usually say "Open Ctrl O O". But maybe this is deliberate till it is working as currently if I press Alt F O I get stuck in nomans land with no focus, tab & arrow do not work and I have to press Esc to get out of it. |
I think the Mnemonics issue is unrelated, and it would be preferable to have a separate issue for that. MuseScore uses a custom menu implementation on Windows, so speech for mnemonic shortcuts was probably just not implemented. However, mnemonics themselves should be working correctly. If not, that would be a regression and would deserve an issue on its own. |
Hey, I would like to work on it :) |
Issue reported here on .org, along with issues with the Up arrow keystroke. |
Came up again in https://musescore.org/en/node/366117 |
As noted in #22179 (comment), this is a bit worse than just "not working yet": pressing a letter key while a list is focused is interpreted as activating a global keyboard shortcut, resulting in notes unexpectedly being repitched for example. |
Working on this. |
@cbjeukendrup I worked on this issue earlier. It seems like the focus is disabled for dropdowns by this line: @Eism mentioned that this was done intentionally so that opening dropdowns wouldn't steal focus from the current window. Hope this helps you, @shubham-shinde-442 :) |
@Eism mentioned that this was done intentionally so that opening dropdowns wouldn't steal focus from the current window. Why should the score respond to keystrokes made when the user has a menu open? If the user expects/wants their keystroke to interact with the score, but notices that it doesn't, they can simple escape the menu and press the keystroke again. Seems like standard fare with lists and menus. What am I missing here? MuseScore exhibited lots of focus issues over the years. Thankfully many of them have been fixed, resulting in improved and mainstream UX. I hope to see this resolved. Searching font menus can be a pain. |
I'm not sure, but possible reasons might be:
@shubham-shinde-442, you could try focusing the dropdown if you like. If you do, those are the things I would watch out for. |
Task description
When a dropdown, menu or list is focused, you should be able to type text on the keyboard, to quickly jump to the corresponding item.
For example, in the dropdown shown below,
when you press
S
, it should highlight thefirstnext item that comes lexicographically after "S", so in this case "Sans Serif Collection".when you press
S
E
in quick succession, it should highlight thefirstnext item that comes lexicographically after "Se", so in this case "Segoe Fluent Icons".when you press
S
G
in quick succession, it should highlight thefirstnext item that comes lexicographically after "Sg", so in this case "Showcard Gothic".Edits by @shoogle:
Changed 'first' to 'next'.
The delay for "in quick succession" is one second (see WM_CHAR), but could be made configurable in Preferences > Advanced. Within this period, letters are added to a string buffer and a search is performed for the entire string. If the current item starts with the string then selection remains on this item, otherwise it goes to the next item that starts with the string. After the period expires, the string buffer is emptied. A subsequent key press starts a fresh search with a new string buffer, and will move to the next matching item even if the current item is a match.
If the first letter is pressed repeatedly (e.g.
S
S
S
) then the selection cycles through items that begin with that letter (e.g. "Sans", "Sergeo", "Showcard"). However, the buffer is still saved asSSS
, and if a different character is pressed before it empties (e.g.SSSQ
) then the selection jumps to the next item starting with this entire string (e.g. "Sssquash").See PR #5829 for previous implementation in MuseScore 3. If in doubt, check the behaviour of Windows File Explorer.
Technical note
This will need to be implemented for all QML dropdowns/menus/lists/treeViews.
In Qt Widgets, this already works out of the box (and for those few cases where it doesn't, we shouldn't invest time to fix it since Qt Widgets is going to be replaced eventually anyway).
The text was updated successfully, but these errors were encountered: