From b152df76709c035045ae680f3e604b0d65228a16 Mon Sep 17 00:00:00 2001 From: ItsLemmy Date: Sun, 12 Oct 2025 18:35:22 -0400 Subject: [PATCH] Calendar: close with esc --- Modules/Bar/Calendar/CalendarPanel.qml | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/Modules/Bar/Calendar/CalendarPanel.qml b/Modules/Bar/Calendar/CalendarPanel.qml index 5ed2f161..68b27ab3 100644 --- a/Modules/Bar/Calendar/CalendarPanel.qml +++ b/Modules/Bar/Calendar/CalendarPanel.qml @@ -14,6 +14,7 @@ NPanel { preferredWidth: (Settings.data.location.showWeekNumberInCalendar ? 400 : 380) * Style.uiScaleRatio preferredHeight: 520 * Style.uiScaleRatio + panelKeyboardFocus: true panelContent: ColumnLayout { id: content @@ -29,6 +30,20 @@ NPanel { return (Time.date.getMonth() === grid.month) && (Time.date.getFullYear() === grid.year) } + Shortcut { + sequence: "Escape" + onActivated: { + if (timerActive) { + cancelTimer() + } else { + cancelTimer() + root.close() + } + } + context: Qt.WidgetShortcut + enabled: root.opened + } + Connections { target: Time function onDateChanged() {