Add autocomplete accept & cancel to the hotkeys list.

(cherry picked from commit da2610b93b)
This commit is contained in:
Jeff Young 2024-03-15 00:40:01 +00:00
parent b4131f2575
commit c07604bb03
2 changed files with 69 additions and 64 deletions

View File

@ -32,14 +32,18 @@
class PSEUDO_ACTION : public TOOL_ACTION class PSEUDO_ACTION : public TOOL_ACTION
{ {
public: public:
PSEUDO_ACTION( const wxString& aLabel, int aHotKey ) PSEUDO_ACTION( const wxString& aLabel, int aHotKey, int aHotKeyAlt = 0 )
{ {
m_friendlyName = aLabel; m_friendlyName = aLabel;
m_hotKey = aHotKey; m_hotKey = aHotKey;
m_hotKeyAlt = aHotKeyAlt;
} }
}; };
static PSEUDO_ACTION* g_gesturePseudoActions[] = { static PSEUDO_ACTION* g_gesturePseudoActions[] = {
new PSEUDO_ACTION( _( "Accept Autocomplete" ), WXK_RETURN, WXK_NUMPAD_ENTER ),
new PSEUDO_ACTION( _( "Cancel Autocomplete" ), WXK_ESCAPE ),
new PSEUDO_ACTION( _( "Toggle Checkbox" ), WXK_SPACE ),
new PSEUDO_ACTION( _( "Pan Left/Right" ), MD_CTRL + PSEUDO_WXK_WHEEL ), new PSEUDO_ACTION( _( "Pan Left/Right" ), MD_CTRL + PSEUDO_WXK_WHEEL ),
new PSEUDO_ACTION( _( "Pan Up/Down" ), MD_SHIFT + PSEUDO_WXK_WHEEL ), new PSEUDO_ACTION( _( "Pan Up/Down" ), MD_SHIFT + PSEUDO_WXK_WHEEL ),
new PSEUDO_ACTION( _( "Finish Drawing" ), PSEUDO_WXK_DBLCLICK ), new PSEUDO_ACTION( _( "Finish Drawing" ), PSEUDO_WXK_DBLCLICK ),

View File

@ -123,6 +123,7 @@ static struct hotkey_name_descr hotkeyNameList[] =
{ wxT( "Num Pad *" ), WXK_NUMPAD_MULTIPLY }, { wxT( "Num Pad *" ), WXK_NUMPAD_MULTIPLY },
{ wxT( "Num Pad /" ), WXK_NUMPAD_DIVIDE }, { wxT( "Num Pad /" ), WXK_NUMPAD_DIVIDE },
{ wxT( "Num Pad ." ), WXK_NUMPAD_SEPARATOR }, { wxT( "Num Pad ." ), WXK_NUMPAD_SEPARATOR },
{ wxT( "Num Pad Enter" ), WXK_NUMPAD_ENTER },
{ wxT( "Num Pad F1"), WXK_NUMPAD_F1 }, { wxT( "Num Pad F1"), WXK_NUMPAD_F1 },
{ wxT( "Num Pad F2"), WXK_NUMPAD_F2 }, { wxT( "Num Pad F2"), WXK_NUMPAD_F2 },
{ wxT( "Num Pad F3"), WXK_NUMPAD_F3 }, { wxT( "Num Pad F3"), WXK_NUMPAD_F3 },