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
{
public:
PSEUDO_ACTION( const wxString& aLabel, int aHotKey )
PSEUDO_ACTION( const wxString& aLabel, int aHotKey, int aHotKeyAlt = 0 )
{
m_friendlyName = aLabel;
m_hotKey = aHotKey;
m_hotKeyAlt = aHotKeyAlt;
}
};
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 Up/Down" ), MD_SHIFT + PSEUDO_WXK_WHEEL ),
new PSEUDO_ACTION( _( "Finish Drawing" ), PSEUDO_WXK_DBLCLICK ),

View File

@ -63,79 +63,80 @@ struct hotkey_name_descr
#define KEY_NON_FOUND -1
static struct hotkey_name_descr hotkeyNameList[] =
{
{ wxT( "F1" ), WXK_F1 },
{ wxT( "F2" ), WXK_F2 },
{ wxT( "F3" ), WXK_F3 },
{ wxT( "F4" ), WXK_F4 },
{ wxT( "F5" ), WXK_F5 },
{ wxT( "F6" ), WXK_F6 },
{ wxT( "F7" ), WXK_F7 },
{ wxT( "F8" ), WXK_F8 },
{ wxT( "F9" ), WXK_F9 },
{ wxT( "F10" ), WXK_F10 },
{ wxT( "F11" ), WXK_F11 },
{ wxT( "F12" ), WXK_F12 },
{ wxT( "F13" ), WXK_F13 },
{ wxT( "F14" ), WXK_F14 },
{ wxT( "F15" ), WXK_F15 },
{ wxT( "F16" ), WXK_F16 },
{ wxT( "F17" ), WXK_F17 },
{ wxT( "F18" ), WXK_F18 },
{ wxT( "F19" ), WXK_F19 },
{ wxT( "F20" ), WXK_F20 },
{ wxT( "F21" ), WXK_F21 },
{ wxT( "F22" ), WXK_F22 },
{ wxT( "F23" ), WXK_F23 },
{ wxT( "F24" ), WXK_F24 },
{ wxT( "F1" ), WXK_F1 },
{ wxT( "F2" ), WXK_F2 },
{ wxT( "F3" ), WXK_F3 },
{ wxT( "F4" ), WXK_F4 },
{ wxT( "F5" ), WXK_F5 },
{ wxT( "F6" ), WXK_F6 },
{ wxT( "F7" ), WXK_F7 },
{ wxT( "F8" ), WXK_F8 },
{ wxT( "F9" ), WXK_F9 },
{ wxT( "F10" ), WXK_F10 },
{ wxT( "F11" ), WXK_F11 },
{ wxT( "F12" ), WXK_F12 },
{ wxT( "F13" ), WXK_F13 },
{ wxT( "F14" ), WXK_F14 },
{ wxT( "F15" ), WXK_F15 },
{ wxT( "F16" ), WXK_F16 },
{ wxT( "F17" ), WXK_F17 },
{ wxT( "F18" ), WXK_F18 },
{ wxT( "F19" ), WXK_F19 },
{ wxT( "F20" ), WXK_F20 },
{ wxT( "F21" ), WXK_F21 },
{ wxT( "F22" ), WXK_F22 },
{ wxT( "F23" ), WXK_F23 },
{ wxT( "F24" ), WXK_F24 },
{ wxT( "Esc" ), WXK_ESCAPE },
{ wxT( "Del" ), WXK_DELETE },
{ wxT( "Tab" ), WXK_TAB },
{ wxT( "Back" ), WXK_BACK },
{ wxT( "Ins" ), WXK_INSERT },
{ wxT( "Esc" ), WXK_ESCAPE },
{ wxT( "Del" ), WXK_DELETE },
{ wxT( "Tab" ), WXK_TAB },
{ wxT( "Back" ), WXK_BACK },
{ wxT( "Ins" ), WXK_INSERT },
{ wxT( "Home" ), WXK_HOME },
{ wxT( "End" ), WXK_END },
{ wxT( "PgUp" ), WXK_PAGEUP },
{ wxT( "PgDn" ), WXK_PAGEDOWN },
{ wxT( "Home" ), WXK_HOME },
{ wxT( "End" ), WXK_END },
{ wxT( "PgUp" ), WXK_PAGEUP },
{ wxT( "PgDn" ), WXK_PAGEDOWN },
{ wxT( "Up" ), WXK_UP },
{ wxT( "Down" ), WXK_DOWN },
{ wxT( "Left" ), WXK_LEFT },
{ wxT( "Right" ), WXK_RIGHT },
{ wxT( "Up" ), WXK_UP },
{ wxT( "Down" ), WXK_DOWN },
{ wxT( "Left" ), WXK_LEFT },
{ wxT( "Right" ), WXK_RIGHT },
{ wxT( "Return" ), WXK_RETURN },
{ wxT( "Return" ), WXK_RETURN },
{ wxT( "Space" ), WXK_SPACE },
{ wxT( "Space" ), WXK_SPACE },
{ wxT( "Num Pad 0" ), WXK_NUMPAD0 },
{ wxT( "Num Pad 1" ), WXK_NUMPAD1 },
{ wxT( "Num Pad 2" ), WXK_NUMPAD2 },
{ wxT( "Num Pad 3" ), WXK_NUMPAD3 },
{ wxT( "Num Pad 4" ), WXK_NUMPAD4 },
{ wxT( "Num Pad 5" ), WXK_NUMPAD5 },
{ wxT( "Num Pad 6" ), WXK_NUMPAD6 },
{ wxT( "Num Pad 7" ), WXK_NUMPAD7 },
{ wxT( "Num Pad 8" ), WXK_NUMPAD8 },
{ wxT( "Num Pad 9" ), WXK_NUMPAD9 },
{ wxT( "Num Pad +" ), WXK_NUMPAD_ADD },
{ wxT( "Num Pad -" ), WXK_NUMPAD_SUBTRACT },
{ wxT( "Num Pad *" ), WXK_NUMPAD_MULTIPLY },
{ wxT( "Num Pad /" ), WXK_NUMPAD_DIVIDE },
{ wxT( "Num Pad ." ), WXK_NUMPAD_SEPARATOR },
{ wxT( "Num Pad F1"), WXK_NUMPAD_F1 },
{ wxT( "Num Pad F2"), WXK_NUMPAD_F2 },
{ wxT( "Num Pad F3"), WXK_NUMPAD_F3 },
{ wxT( "Num Pad F4"), WXK_NUMPAD_F4 },
{ wxT( "Num Pad 0" ), WXK_NUMPAD0 },
{ wxT( "Num Pad 1" ), WXK_NUMPAD1 },
{ wxT( "Num Pad 2" ), WXK_NUMPAD2 },
{ wxT( "Num Pad 3" ), WXK_NUMPAD3 },
{ wxT( "Num Pad 4" ), WXK_NUMPAD4 },
{ wxT( "Num Pad 5" ), WXK_NUMPAD5 },
{ wxT( "Num Pad 6" ), WXK_NUMPAD6 },
{ wxT( "Num Pad 7" ), WXK_NUMPAD7 },
{ wxT( "Num Pad 8" ), WXK_NUMPAD8 },
{ wxT( "Num Pad 9" ), WXK_NUMPAD9 },
{ wxT( "Num Pad +" ), WXK_NUMPAD_ADD },
{ wxT( "Num Pad -" ), WXK_NUMPAD_SUBTRACT },
{ wxT( "Num Pad *" ), WXK_NUMPAD_MULTIPLY },
{ wxT( "Num Pad /" ), WXK_NUMPAD_DIVIDE },
{ wxT( "Num Pad ." ), WXK_NUMPAD_SEPARATOR },
{ wxT( "Num Pad Enter" ), WXK_NUMPAD_ENTER },
{ wxT( "Num Pad F1"), WXK_NUMPAD_F1 },
{ wxT( "Num Pad F2"), WXK_NUMPAD_F2 },
{ wxT( "Num Pad F3"), WXK_NUMPAD_F3 },
{ wxT( "Num Pad F4"), WXK_NUMPAD_F4 },
{ wxT( "" ), 0 },
{ wxT( "" ), 0 },
{ wxT( "Click" ), PSEUDO_WXK_CLICK },
{ wxT( "DblClick" ), PSEUDO_WXK_DBLCLICK },
{ wxT( "Wheel" ), PSEUDO_WXK_WHEEL },
{ wxT( "Click" ), PSEUDO_WXK_CLICK },
{ wxT( "DblClick" ), PSEUDO_WXK_DBLCLICK },
{ wxT( "Wheel" ), PSEUDO_WXK_WHEEL },
// Do not change this line: end of list
{ wxT( "" ), KEY_NON_FOUND }
{ wxT( "" ), KEY_NON_FOUND }
};