Skip to content

applets/kicker: fix and simplify runner keyboard navigation

Christoph Wolk requested to merge cwo/plasma-desktop:runner-no-loop into master

When the runner columns are shown, kicker's keyboard navigation breaks in two ways: immediately moving to the right from the search field leads to a selection in two columns, as the currentIndex is not reset, and the whole thing becomes somewhat broken if the first column is not visible (i.e. the search only matches in later runners). This is because keyboard navigation iterates through all possible columns and attempts to find the right one, but this is complex and it often doesn't do a good job of not taking invisible things into account.

Instead, we can get rid of the manual looping and tracking - qml already computes a list of all the visible columns anyway for the visibleChildren property. We just need to exclude the Repeater and then we can directly access the correct column. We also clear the currentIndex as necessary to fix the first issue.


Test plan:

  1. Search something with hits in multiple runners (for me, "scri" finds Konsole and KWin Scripts), press right arrow

  2. (without) first two columns have item selected (with) only second column has item selected

  3. Search something with no hits in the first column (for me, "wallp" finds the wallpaper kcm and some files, but no apps), press right arrow

  4. (without) nothing appears to happen (but we're actually moving up from the search field to the first visible column) (with) second visible column is selected

Edited by Christoph Wolk

Merge request reports

Loading