diff options
| author | Eduard Braun <Eduard.Braun2@gmx.de> | 2017-06-18 17:54:03 +0000 |
|---|---|---|
| committer | Eduard Braun <eduard.braun2@gmx.de> | 2017-06-23 21:55:03 +0000 |
| commit | 46fd67ec49c3988db20db422061a2f52582c896c (patch) | |
| tree | a302a68c1694ffa59872d0b50f611f97f68981ec /src/ui/tools/pen-tool.cpp | |
| parent | Merge branch 'ui-files-for-ui-xml' (diff) | |
| download | inkscape-46fd67ec49c3988db20db422061a2f52582c896c.tar.gz inkscape-46fd67ec49c3988db20db422061a2f52582c896c.zip | |
Improve and simplify shortcut handling.
Should fix many issues with unusuable keys, especially on non-English keyboard layouts.
Diffstat (limited to 'src/ui/tools/pen-tool.cpp')
| -rw-r--r-- | src/ui/tools/pen-tool.cpp | 8 |
1 files changed, 1 insertions, 7 deletions
diff --git a/src/ui/tools/pen-tool.cpp b/src/ui/tools/pen-tool.cpp index caf6faec2..0422dc9cd 100644 --- a/src/ui/tools/pen-tool.cpp +++ b/src/ui/tools/pen-tool.cpp @@ -1050,13 +1050,7 @@ bool PenTool::_handleKeyPress(GdkEvent *event) { // Check for undo if we have started drawing a path. if (this->npoints > 0) { - unsigned int shortcut = Inkscape::UI::Tools::get_group0_keyval (&event->key) | - ( event->key.state & GDK_SHIFT_MASK ? - SP_SHORTCUT_SHIFT_MASK : 0 ) | - ( event->key.state & GDK_CONTROL_MASK ? - SP_SHORTCUT_CONTROL_MASK : 0 ) | - ( event->key.state & GDK_MOD1_MASK ? - SP_SHORTCUT_ALT_MASK : 0 ); + unsigned int shortcut = sp_shortcut_get_for_event((GdkEventKey*)event); Inkscape::Verb* verb = sp_shortcut_get_verb(shortcut); if (verb) { unsigned int vcode = verb->get_code(); |
