Ref T606, added back/tab/ESC as hotkeys

This commit is contained in:
Klaus Basan
2019-04-14 02:35:38 +02:00
parent df686d7efc
commit 9287713cb8
7 changed files with 21 additions and 2 deletions

View File

@@ -314,6 +314,7 @@ namespace BlackGui
void CHotkeyDialog::setupAdvancedFrame()
{
if (!sGui || sGui->isShuttingDown()) { return; }
this->clearAdvancedFrame();
const CKeyboardKeyList allSupportedKeys = CKeyboardKeyList::allSupportedKeys();
const CJoystickButtonList allAvailableButtons = sGui->getInputManager()->getAllAvailableJoystickButtons();

View File

@@ -73,6 +73,9 @@ namespace BlackInput
{ XK_period, Key_Period },
{ XK_KP_Divide, Key_Divide },
{ XK_KP_Multiply, Key_Multiply },
{ XK_BackSpace, Key_Back },
{ XK_Tab, Key_Tab },
{ XK_Escape, Key_Esc },
{ XK_comma, Key_Comma },
};

View File

@@ -62,8 +62,11 @@ namespace BlackInput
{ kHIDUsage_KeypadHyphen, Key_Minus },
{ kHIDUsage_KeyboardHyphen, Key_Minus },
{ kHIDUsage_KeyboardPeriod, Key_Period },
{ kHIDUsage_KeypadSlash, Key_Divide },
{ kHIDUsage_KeypadAsterisk, Key_Multiply },
{ kHIDUsage_KeypadSlash, Key_Divide },
{ kHIDUsage_KeyboardDeleteOrBackspace, Key_Back },
{ kHIDUsage_KeyboardTab, Key_Tab },
{ kHIDUsage_KeyboardEscape, Key_Esc },
{ kHIDUsage_KeyboardComma, Key_Comma },
{ kHIDUsage_Keypad0, Key_Numpad0 },
{ kHIDUsage_Keypad1, Key_Numpad1 },

View File

@@ -64,6 +64,9 @@ namespace BlackInput
{ VK_OEM_MINUS, Key_Minus },
{ VK_OEM_PERIOD, Key_Period },
{ VK_DIVIDE, Key_Divide },
{ VK_BACK, Key_Back },
{ VK_TAB, Key_Tab },
{ VK_ESCAPE, Key_Esc },
{ VK_MULTIPLY, Key_Multiply },
{ VK_OEM_COMMA, Key_Comma },
{ VK_NUMPAD0, Key_Numpad0 },

View File

@@ -68,6 +68,9 @@ namespace BlackMisc
case Key_Numpad7: return QStringLiteral("Num7");
case Key_Numpad8: return QStringLiteral("Num8");
case Key_Numpad9: return QStringLiteral("Num9");
case Key_Esc: return QStringLiteral("ESC");
case Key_Tab: return QStringLiteral("Tab");
case Key_Back: return QStringLiteral("Backspace");
default: return QChar::fromLatin1(static_cast<char>(m_keyCode));
}
}
@@ -105,7 +108,7 @@ namespace BlackMisc
void CKeyboardKey::setPropertyByIndex(const CPropertyIndex &index, const CVariant &variant)
{
if (index.isMyself()) { (*this) = variant.to<CKeyboardKey>(); return; }
ColumnIndex i = index.frontCasted<ColumnIndex>();
const ColumnIndex i = index.frontCasted<ColumnIndex>();
switch (i)
{
case IndexKey:

View File

@@ -45,6 +45,9 @@ namespace BlackMisc
CKeyboardKey(Key_Comma),
CKeyboardKey(Key_Multiply),
CKeyboardKey(Key_Divide),
CKeyboardKey(Key_Back),
CKeyboardKey(Key_Tab),
CKeyboardKey(Key_Esc),
CKeyboardKey(Key_A),
CKeyboardKey(Key_B),
CKeyboardKey(Key_C),

View File

@@ -27,6 +27,9 @@ namespace BlackMisc
Key_ControlRight,
Key_AltLeft,
Key_AltRight,
Key_Back,
Key_Tab,
Key_Esc,
Key_Plus = 43,
Key_Comma,
Key_Minus,