From a2fc9325c9310049cae2b73c8682718f57e1d32a Mon Sep 17 00:00:00 2001 From: WerWolv Date: Tue, 3 Mar 2026 13:46:16 +0100 Subject: [PATCH] fix: Shortcuts not getting dispatched to menu inherit view correctly --- lib/libimhex/source/api/shortcut_manager.cpp | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/lib/libimhex/source/api/shortcut_manager.cpp b/lib/libimhex/source/api/shortcut_manager.cpp index ca5b69ebe..8bf8b615c 100644 --- a/lib/libimhex/source/api/shortcut_manager.cpp +++ b/lib/libimhex/source/api/shortcut_manager.cpp @@ -367,7 +367,11 @@ namespace hex { if (keyCode != 0) s_prevShortcut = Shortcut(pressedShortcut.getKeys()); - runShortcut(pressedShortcut, currentView); + const auto inheritedShortcutsView = currentView->getMenuItemInheritView(); + if (!runShortcut(pressedShortcut, currentView)) { + if (inheritedShortcutsView != nullptr) + runShortcut(pressedShortcut, inheritedShortcutsView); + } } void ShortcutManager::processGlobals(bool ctrl, bool alt, bool shift, bool super, u32 keyCode) {