From 46fd67ec49c3988db20db422061a2f52582c896c Mon Sep 17 00:00:00 2001 From: Eduard Braun Date: Sun, 18 Jun 2017 19:54:03 +0200 Subject: Improve and simplify shortcut handling. Should fix many issues with unusuable keys, especially on non-English keyboard layouts. --- src/helper/window.cpp | 10 +--------- 1 file changed, 1 insertion(+), 9 deletions(-) (limited to 'src/helper/window.cpp') diff --git a/src/helper/window.cpp b/src/helper/window.cpp index 98e886a38..28fc25606 100644 --- a/src/helper/window.cpp +++ b/src/helper/window.cpp @@ -13,20 +13,12 @@ #include "desktop.h" #include "inkscape.h" #include "shortcuts.h" -#include "ui/tools/tool-base.h" #include "window.h" static bool on_window_key_press(GdkEventKey* event) { unsigned shortcut = 0; - // FIXME why? - shortcut = Inkscape::UI::Tools::get_group0_keyval (event) | - ( event->state & GDK_SHIFT_MASK ? - SP_SHORTCUT_SHIFT_MASK : 0 ) | - ( event->state & GDK_CONTROL_MASK ? - SP_SHORTCUT_CONTROL_MASK : 0 ) | - ( event->state & GDK_MOD1_MASK ? - SP_SHORTCUT_ALT_MASK : 0 ); + shortcut = sp_shortcut_get_for_event(event); return sp_shortcut_invoke (shortcut, SP_ACTIVE_DESKTOP); } -- cgit v1.2.3