From 842b62097ed4a7d1086667105aeb892e7ccbb183 Mon Sep 17 00:00:00 2001 From: Tobias Predel Date: Tue, 12 Sep 2023 22:26:08 +0200 Subject: [PATCH] Accelerator keys for zoom are not always fetched at menu level When the key events for zooming are first fetched at canvas level, they will not be propagated to the menu level on wxGTK. This commit adds yet another workaround to the already existing long list. --- src/document.h | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/src/document.h b/src/document.h index 1aeb3b40..083f6461 100755 --- a/src/document.h +++ b/src/document.h @@ -972,6 +972,14 @@ struct Document { } return Action( dc, shift ? (ctrl ? A_PREVFILE : A_PREV) : (ctrl ? A_NEXTFILE : A_NEXT)); + case WXK_PAGEUP: + if (ctrl) return Action(dc, A_ZOOMIN); + sw->CursorScroll(0, -g_scrollratecursor); + return nullptr; + case WXK_PAGEDOWN: + if (ctrl) return Action(dc, A_ZOOMOUT); + sw->CursorScroll(0, g_scrollratecursor); + return nullptr; #endif } } else if (uk >= ' ') {