From cb0ec976539c95ca26a8f023a721c9b551bd3d90 Mon Sep 17 00:00:00 2001 From: SShubham1 Date: Fri, 22 May 2026 16:56:51 +0530 Subject: [PATCH] calendar-list: move previous/next week with PgUp/PgDown via ShortcutController Currently, clicking on a calendar in the sidebar's listbox traps the keyboard focus. As a result, pressing PageUp or PageDown scrolls the listbox instead of switching the date. Similar to commit fbc18174 for the week view, this adds a capture-phase ShortcutController to the calendar listbox. This ensures that PgUp and PgDown consistently switch month or week regardless of whether a calendar item is focused. Fixes #1593 Part-of: --- src/gui/gcal-calendar-list.blp | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/src/gui/gcal-calendar-list.blp b/src/gui/gcal-calendar-list.blp index 3c574dbf..13d61399 100644 --- a/src/gui/gcal-calendar-list.blp +++ b/src/gui/gcal-calendar-list.blp @@ -15,6 +15,21 @@ template $GcalCalendarList: Adw.Bin { hexpand: true; selection-mode: none; row-activated => $on_listbox_row_activated_cb(template) not-swapped; + // Allow Page-Up/Page-Down to consistently switch months/weeks, + // regardless of whether the sidebar's calendars listbox has focus. + ShortcutController { + propagation-phase: capture; + + Shortcut { + trigger: "Page_Up"; + action: "action(win.previous-date)"; + } + + Shortcut { + trigger: "Page_Down"; + action: "action(win.next-date)"; + } + } styles [ "navigation-sidebar",