From 2c77b4c97938d5e334b46e13ec660aea534b6211 Mon Sep 17 00:00:00 2001 From: Marco Allegretti Date: Mon, 13 Apr 2026 13:53:53 +0200 Subject: [PATCH] Dismiss action drawer with Escape in convergence mode --- components/mobileshell/qml/actiondrawer/ActionDrawer.qml | 7 +++++++ .../mobileshell/qml/actiondrawer/ActionDrawerWindow.qml | 2 +- 2 files changed, 8 insertions(+), 1 deletion(-) diff --git a/components/mobileshell/qml/actiondrawer/ActionDrawer.qml b/components/mobileshell/qml/actiondrawer/ActionDrawer.qml index cbe4228a..8c38d9b8 100644 --- a/components/mobileshell/qml/actiondrawer/ActionDrawer.qml +++ b/components/mobileshell/qml/actiondrawer/ActionDrawer.qml @@ -169,8 +169,15 @@ Item { root.state = ""; } + Keys.onEscapePressed: { + if (intendedToBeVisible) { + close(); + } + } + function open() { cancelAnimations(); + forceActiveFocus(); if (openToPinnedMode) { root.state = "open"; // go to pinned height } else { diff --git a/components/mobileshell/qml/actiondrawer/ActionDrawerWindow.qml b/components/mobileshell/qml/actiondrawer/ActionDrawerWindow.qml index 9be9ff0d..a774e184 100644 --- a/components/mobileshell/qml/actiondrawer/ActionDrawerWindow.qml +++ b/components/mobileshell/qml/actiondrawer/ActionDrawerWindow.qml @@ -27,7 +27,7 @@ Window { LayerShell.Window.anchors: LayerShell.Window.AnchorTop | LayerShell.Window.AnchorLeft | LayerShell.Window.AnchorRight | LayerShell.Window.AnchorBottom LayerShell.Window.layer: LayerShell.Window.LayerOverlay LayerShell.Window.exclusionZone: -1 - LayerShell.Window.keyboardInteractivity: LayerShell.Window.KeyboardInteractivityNone + LayerShell.Window.keyboardInteractivity: drawer.intendedToBeVisible ? LayerShell.Window.KeyboardInteractivityExclusive : LayerShell.Window.KeyboardInteractivityNone /** * The ActionDrawer component.