Commit 9b0e5d03 authored by Nate Graham's avatar Nate Graham
Browse files

applets/kickoff add Ctrl+HJKL navigation shortcuts

The Milou view used in KRunner and Overview has these navigation
shortcuts already; this commit adds them to Kickoff to preserve a
bit of consistency across Plasma's Search UIs.

BUG: 457552
FIXED-IN: 5.26
parent 849f990f
Pipeline #217293 passed with stage
in 4 minutes and 32 seconds
......@@ -212,18 +212,34 @@ EmptyPage {
moveCurrentIndexLeft()
focusCurrentItem(event, Qt.BacktabFocusReason)
} break
case Qt.Key_H: if (!atLeft && !plasmoid.rootItem.searchField.activeFocus && event.modifiers & Qt.ControlModifier) {
moveCurrentIndexLeft()
focusCurrentItem(event, Qt.BacktabFocusReason)
} break
case Qt.Key_Up: if (!atTop) {
moveCurrentIndexUp()
focusCurrentItem(event, Qt.BacktabFocusReason)
} break
case Qt.Key_K: if (!atTop && event.modifiers & Qt.ControlModifier) {
moveCurrentIndexUp()
focusCurrentItem(event, Qt.BacktabFocusReason)
} break
case Qt.Key_Right: if (!atRight && !plasmoid.rootItem.searchField.activeFocus) {
moveCurrentIndexRight()
focusCurrentItem(event, Qt.TabFocusReason)
} break
case Qt.Key_L: if (!atRight && !plasmoid.rootItem.searchField.activeFocus && event.modifiers & Qt.ControlModifier) {
moveCurrentIndexRight()
focusCurrentItem(event, Qt.TabFocusReason)
} break
case Qt.Key_Down: if (!atBottom) {
moveCurrentIndexDown()
focusCurrentItem(event, Qt.TabFocusReason)
} break
case Qt.Key_J: if (!atBottom && event.modifiers & Qt.ControlModifier) {
moveCurrentIndexDown()
focusCurrentItem(event, Qt.TabFocusReason)
} break
case Qt.Key_Home: if (event.modifiers === Qt.ControlModifier && currentIndex !== 0) {
currentIndex = 0
focusCurrentItem(event, Qt.BacktabFocusReason)
......
......@@ -238,10 +238,18 @@ EmptyPage {
decrementCurrentIndex()
focusCurrentItem(event, Qt.BacktabFocusReason)
} break
case Qt.Key_K: if (!atFirst && event.modifiers & Qt.ControlModifier) {
decrementCurrentIndex()
focusCurrentItem(event, Qt.BacktabFocusReason)
} break
case Qt.Key_Down: if (!atLast) {
incrementCurrentIndex()
focusCurrentItem(event, Qt.TabFocusReason)
} break
case Qt.Key_J: if (!atLast && event.modifiers & Qt.ControlModifier) {
incrementCurrentIndex()
focusCurrentItem(event, Qt.TabFocusReason)
} break
case Qt.Key_Home: if (!atFirst) {
currentIndex = 0
focusCurrentItem(event, Qt.BacktabFocusReason)
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment