From 21ac28a1ec1d6ecccb8a5f0648e1bedec8166da0 Mon Sep 17 00:00:00 2001 From: Jeff Young Date: Thu, 13 Jun 2019 20:38:14 +0100 Subject: [PATCH] Add a few more gestures to the hotkeys list. Fixes: lp:1778437 * https://bugs.launchpad.net/kicad/+bug/1778437 --- common/hotkey_store.cpp | 13 +++++++++---- common/hotkeys_basic.cpp | 11 ++++++----- include/hotkeys_basic.h | 9 +++++---- 3 files changed, 20 insertions(+), 13 deletions(-) diff --git a/common/hotkey_store.cpp b/common/hotkey_store.cpp index 9c04c4bb3b..88e6c19818 100644 --- a/common/hotkey_store.cpp +++ b/common/hotkey_store.cpp @@ -39,10 +39,15 @@ public: }; static GESTURE_PSEUDO_ACTION g_gesturePseudoActions[] = { - GESTURE_PSEUDO_ACTION( _( "Highlight Net" ), MD_CTRL + PSEUDO_WXK_LMB ), - GESTURE_PSEUDO_ACTION( _( "Clear Net Highlighting" ), MD_CTRL + PSEUDO_WXK_LMB ), - GESTURE_PSEUDO_ACTION( _( "Pan Left/Right" ), MD_CTRL + PSEUDO_WXK_WHEEL ), - GESTURE_PSEUDO_ACTION( _( "Pan Up/Down" ), MD_SHIFT + PSEUDO_WXK_WHEEL ), + GESTURE_PSEUDO_ACTION( _( "Highlight Net" ), MD_CTRL + PSEUDO_WXK_LMB ), + GESTURE_PSEUDO_ACTION( _( "Clear Net Highlighting" ), MD_CTRL + PSEUDO_WXK_LMB ), + GESTURE_PSEUDO_ACTION( _( "Pan Left/Right" ), MD_CTRL + PSEUDO_WXK_WHEEL ), + GESTURE_PSEUDO_ACTION( _( "Pan Up/Down" ), MD_SHIFT + PSEUDO_WXK_WHEEL ), + GESTURE_PSEUDO_ACTION( _( "Finish Drawing" ), PSEUDO_WXK_DBLCLICK ), + GESTURE_PSEUDO_ACTION( _( "Add to Selection" ), MD_SHIFT + PSEUDO_WXK_LMB ), + GESTURE_PSEUDO_ACTION( _( "Remove from Selection" ), MD_CTRL + PSEUDO_WXK_LMB ), + GESTURE_PSEUDO_ACTION( _( "Ignore Grid Snaps" ), MD_ALT ), + GESTURE_PSEUDO_ACTION( _( "Ignore Other Snaps" ), MD_SHIFT ), }; diff --git a/common/hotkeys_basic.cpp b/common/hotkeys_basic.cpp index b1a57fa4ea..748f9c055e 100644 --- a/common/hotkeys_basic.cpp +++ b/common/hotkeys_basic.cpp @@ -96,12 +96,13 @@ static struct hotkey_name_descr hotkeyNameList[] = { wxT( "Space" ), WXK_SPACE }, - { wxT( "" ), 0 }, + { wxT( "" ), 0 }, - { wxT( "Left Button" ), PSEUDO_WXK_LMB }, - { wxT( "Middle Button" ), PSEUDO_WXK_MMB }, - { wxT( "Right Button" ), PSEUDO_WXK_RMB }, - { wxT( "Mouse Wheel" ), PSEUDO_WXK_WHEEL }, + { wxT( "Left Button" ), PSEUDO_WXK_LMB }, + { wxT( "Middle Button" ), PSEUDO_WXK_MMB }, + { wxT( "Right Button" ), PSEUDO_WXK_RMB }, + { wxT( "Mouse Wheel" ), PSEUDO_WXK_WHEEL }, + { wxT( "Double-click" ), PSEUDO_WXK_DBLCLICK }, // Do not change this line: end of list { wxT( "" ), KEY_NON_FOUND } diff --git a/include/hotkeys_basic.h b/include/hotkeys_basic.h index cfbf0d7ee5..84f087553f 100644 --- a/include/hotkeys_basic.h +++ b/include/hotkeys_basic.h @@ -47,10 +47,11 @@ class EDA_BASE_FRAME; /* * Keep these out of the ASCII range, and out of the WXK range */ -#define PSEUDO_WXK_LMB 400 -#define PSEUDO_WXK_MMB 401 -#define PSEUDO_WXK_RMB 402 -#define PSEUDO_WXK_WHEEL 403 +#define PSEUDO_WXK_LMB 400 +#define PSEUDO_WXK_MMB 401 +#define PSEUDO_WXK_RMB 402 +#define PSEUDO_WXK_WHEEL 403 +#define PSEUDO_WXK_DBLCLICK 404 /** * Function KeyCodeFromKeyName