keyboard navigation appears broken in crate section of track context menu

Bug #1740193 reported by Daniel Schürmann
10
This bug affects 2 people
Affects Status Importance Assigned to Milestone
Mixxx
Confirmed
Medium
Unassigned

Bug Description

Keyboard navigation is broken in crate section of track context menu
Now that we have check boxes in the crate menu, you cannot move the focus around as expected using keyboard.

Changed in mixxx:
milestone: none → 2.1.0
importance: Undecided → High
Revision history for this message
Ray Campbell (essence-82) wrote :

Testing the latest version of mixxx x64 2.01 alfa this problem still remains.

Revision history for this message
Be (be.ing) wrote :

Hi Ray, we have not started working on this yet. We will change the status of this bug to In Progress when we have. I understand this is a big usability issue so this is definitely on our radar to fix soon.

Revision history for this message
Be (be.ing) wrote :
Revision history for this message
NT Music (ntmusic-deactivatedaccount) wrote :

Replacing the nested QCheckBox/QWidgetAction with pAction->setCheckable(true); in WTrackTableView::slotPopulateCrateMenu() seems to fix the keyboard navigation.

Revision history for this message
poelzi (poelzi) wrote :

I tried to replicate the bug, but for me the menu behaves like it should. The checkable solution I tried first, but it does not allow the tristate option which is required for correct behavior.

Maybe it depends on OS ? Works fine on Linux with KDE Desktop.

Revision history for this message
David Hernández Morales (davidhm) wrote :

So, here's the things I've tried:

- Subclassing QCheckBox and reimplementing the keyPressEvent() to catch the enter key. Doesn’t work, apparently the key event doesn’t get through the QWidgetAction class.

- Subclassing QWidgetAction and reimplementing the event() function. Doesn’t work either.

- Connecting the QWidgetAction triggered() signal to the inherited toggle() slot from QCheckBox. It works partially, but not as intended. When connecting all actions to their respective checkboxes and pressing enter on whichever crate, only the last crate is modified. I will investigate further.

Also, I don't know if this can be done but ideally pressing enter would only select or unselect the crate, not pop the menu. However, the latter happens because it's the default behaviour for QMenu when an action is triggered. As mentioned in point 2, I tried reimplementing the event() function in the QWidgetAction but it doesn't work.

Be (be.ing)
Changed in mixxx:
status: New → Confirmed
Revision history for this message
Be (be.ing) wrote :

I think you may have been working with the wrong widgets, David. Perhaps intercepting arrow key up/down events from the m_pCrateMenu and using QMenu::setActiveAction could work.

Revision history for this message
Be (be.ing) wrote :

I just tested this again and it actually does work, just not quite as expected. The active crate is indicated by a dotted border around the name and crates can be selected/unselected with the space bar. This is unexpected because the background color of the item in the menu does not change when it is selected. I will see if I can fix that.

Revision history for this message
Be (be.ing) wrote :

When the Crates menu is first shown, no item is highlighted so it seems like navigating with the arrow keys would not work. However, pressing the up and down arrows does actually work.

Be (be.ing)
summary: - keyboard navigation is broroken in crate section of track context menu
+ keyboard navigation appears broken in crate section of track context
+ menu
Be (be.ing)
Changed in mixxx:
milestone: 2.1.0 → none
Revision history for this message
ronso0 (ronso0) wrote :

Is this fixed with recent stylesheets for all menus on Windows, too?

Changed in mixxx:
importance: High → Medium
Revision history for this message
Swiftb0y (swiftb0y) wrote :

Mixxx now uses GitHub for bug tracking. This bug has been migrated to:
https://github.com/mixxxdj/mixxx/issues/9016

lock status: Metadata changes locked and limited to project staff
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.