From 2179c3c0147a9ce01a93fede89c58764ba446205 Mon Sep 17 00:00:00 2001 From: WerWolv Date: Sun, 21 May 2023 18:02:29 +0200 Subject: [PATCH] fix: View shortcuts acting like global shortcuts --- lib/libimhex/source/api/keybinding.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/libimhex/source/api/keybinding.cpp b/lib/libimhex/source/api/keybinding.cpp index 7b76d7baf..4f0647327 100644 --- a/lib/libimhex/source/api/keybinding.cpp +++ b/lib/libimhex/source/api/keybinding.cpp @@ -12,7 +12,7 @@ namespace hex { } void ShortcutManager::addShortcut(View *view, const Shortcut &shortcut, const std::function &callback) { - view->m_shortcuts.insert({ shortcut, callback }); + view->m_shortcuts.insert({ shortcut + CurrentView, callback }); } static Shortcut getShortcut(bool ctrl, bool alt, bool shift, bool super, bool focused, u32 keyCode) {