Commit f66f0e29 authored by Fushan Wen's avatar Fushan Wen 💬
Browse files

applets/kicker: add keyboard navigation support for dashboard

Application dashboard uses full representation, which requires adding
key handling manually.
parent 9e68b7bd
......@@ -8,6 +8,7 @@ import QtQuick 2.15
import QtQuick.Layouts 1.15
import org.kde.plasma.core 2.0 as PlasmaCore
import org.kde.plasma.plasmoid 2.0
import org.kde.plasma.private.kicker 0.1 as Kicker
......@@ -87,8 +88,20 @@ Item {
property bool wasExpanded: false;
activeFocusOnTab: true
hoverEnabled: !root.dashWindow || !root.dashWindow.visible
Keys.onPressed: {
switch (event.key) {
case Qt.Key_Space:
case Qt.Key_Enter:
case Qt.Key_Return:
case Qt.Key_Select:
Plasmoid.activated();
break;
}
}
onPressed: {
if (!kicker.isDash) {
wasExpanded = plasmoid.expanded
......
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