mirror of
https://github.com/swift-project/pilotclient.git
synced 2026-04-19 03:45:30 +08:00
Ref T645, added space/dead grave as hotkeys
This commit is contained in:
@@ -21,7 +21,7 @@ using namespace BlackMisc::Input;
|
|||||||
|
|
||||||
namespace BlackInput
|
namespace BlackInput
|
||||||
{
|
{
|
||||||
|
// https://www.cl.cam.ac.uk/~mgk25/ucs/keysymdef.h
|
||||||
static QHash<int, Input::KeyCode> keyMapping
|
static QHash<int, Input::KeyCode> keyMapping
|
||||||
{
|
{
|
||||||
{ XK_0, Key_0 },
|
{ XK_0, Key_0 },
|
||||||
@@ -76,6 +76,8 @@ namespace BlackInput
|
|||||||
{ XK_BackSpace, Key_Back },
|
{ XK_BackSpace, Key_Back },
|
||||||
{ XK_Tab, Key_Tab },
|
{ XK_Tab, Key_Tab },
|
||||||
{ XK_Escape, Key_Esc },
|
{ XK_Escape, Key_Esc },
|
||||||
|
{ XK_space, Key_Space },
|
||||||
|
{ XK_dead_grave, Key_DeadGrave },
|
||||||
{ XK_comma, Key_Comma },
|
{ XK_comma, Key_Comma },
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|||||||
@@ -19,7 +19,7 @@ using namespace BlackMisc::Input;
|
|||||||
|
|
||||||
namespace BlackInput
|
namespace BlackInput
|
||||||
{
|
{
|
||||||
|
// https://developer.apple.com/documentation/iokit/1592915-anonymous?language=objc
|
||||||
static QHash<quint32, KeyCode> keyMapping
|
static QHash<quint32, KeyCode> keyMapping
|
||||||
{
|
{
|
||||||
{ kHIDUsage_Keyboard0, Key_0 },
|
{ kHIDUsage_Keyboard0, Key_0 },
|
||||||
@@ -67,6 +67,8 @@ namespace BlackInput
|
|||||||
{ kHIDUsage_KeyboardDeleteOrBackspace, Key_Back },
|
{ kHIDUsage_KeyboardDeleteOrBackspace, Key_Back },
|
||||||
{ kHIDUsage_KeyboardTab, Key_Tab },
|
{ kHIDUsage_KeyboardTab, Key_Tab },
|
||||||
{ kHIDUsage_KeyboardEscape, Key_Esc },
|
{ kHIDUsage_KeyboardEscape, Key_Esc },
|
||||||
|
{ kHIDUsage_KeyboardSpacebar, Key_Space },
|
||||||
|
{ kHIDUsage_KeyboardGraveAccentAndTilde, Key_DeadGrave },
|
||||||
{ kHIDUsage_KeyboardComma, Key_Comma },
|
{ kHIDUsage_KeyboardComma, Key_Comma },
|
||||||
{ kHIDUsage_Keypad0, Key_Numpad0 },
|
{ kHIDUsage_Keypad0, Key_Numpad0 },
|
||||||
{ kHIDUsage_Keypad1, Key_Numpad1 },
|
{ kHIDUsage_Keypad1, Key_Numpad1 },
|
||||||
|
|||||||
@@ -67,6 +67,8 @@ namespace BlackInput
|
|||||||
{ VK_BACK, Key_Back },
|
{ VK_BACK, Key_Back },
|
||||||
{ VK_TAB, Key_Tab },
|
{ VK_TAB, Key_Tab },
|
||||||
{ VK_ESCAPE, Key_Esc },
|
{ VK_ESCAPE, Key_Esc },
|
||||||
|
{ VK_SPACE, Key_Space },
|
||||||
|
{ WM_DEADCHAR, Key_DeadGrave },
|
||||||
{ VK_MULTIPLY, Key_Multiply },
|
{ VK_MULTIPLY, Key_Multiply },
|
||||||
{ VK_OEM_COMMA, Key_Comma },
|
{ VK_OEM_COMMA, Key_Comma },
|
||||||
{ VK_NUMPAD0, Key_Numpad0 },
|
{ VK_NUMPAD0, Key_Numpad0 },
|
||||||
|
|||||||
@@ -69,6 +69,8 @@ namespace BlackMisc
|
|||||||
case Key_Numpad8: return QStringLiteral("Num8");
|
case Key_Numpad8: return QStringLiteral("Num8");
|
||||||
case Key_Numpad9: return QStringLiteral("Num9");
|
case Key_Numpad9: return QStringLiteral("Num9");
|
||||||
case Key_Esc: return QStringLiteral("ESC");
|
case Key_Esc: return QStringLiteral("ESC");
|
||||||
|
case Key_Space: return QStringLiteral("Space");
|
||||||
|
case Key_DeadGrave: return QStringLiteral("DeadGrave");
|
||||||
case Key_Tab: return QStringLiteral("Tab");
|
case Key_Tab: return QStringLiteral("Tab");
|
||||||
case Key_Back: return QStringLiteral("Backspace");
|
case Key_Back: return QStringLiteral("Backspace");
|
||||||
default: return QChar::fromLatin1(static_cast<char>(m_keyCode));
|
default: return QChar::fromLatin1(static_cast<char>(m_keyCode));
|
||||||
|
|||||||
@@ -48,6 +48,8 @@ namespace BlackMisc
|
|||||||
CKeyboardKey(Key_Back),
|
CKeyboardKey(Key_Back),
|
||||||
CKeyboardKey(Key_Tab),
|
CKeyboardKey(Key_Tab),
|
||||||
CKeyboardKey(Key_Esc),
|
CKeyboardKey(Key_Esc),
|
||||||
|
CKeyboardKey(Key_Space),
|
||||||
|
CKeyboardKey(Key_DeadGrave),
|
||||||
CKeyboardKey(Key_A),
|
CKeyboardKey(Key_A),
|
||||||
CKeyboardKey(Key_B),
|
CKeyboardKey(Key_B),
|
||||||
CKeyboardKey(Key_C),
|
CKeyboardKey(Key_C),
|
||||||
|
|||||||
@@ -29,7 +29,9 @@ namespace BlackMisc
|
|||||||
Key_AltRight,
|
Key_AltRight,
|
||||||
Key_Back,
|
Key_Back,
|
||||||
Key_Tab,
|
Key_Tab,
|
||||||
Key_Esc,
|
Key_Esc = 27,
|
||||||
|
Key_Space = 32,
|
||||||
|
Key_DeadGrave, // message is sent for a combining key, such as a diacritic.
|
||||||
Key_Plus = 43,
|
Key_Plus = 43,
|
||||||
Key_Comma,
|
Key_Comma,
|
||||||
Key_Minus,
|
Key_Minus,
|
||||||
|
|||||||
Reference in New Issue
Block a user