Fix for #510, for Windows

This commit is contained in:
Alexey 'Cluster' Avdyukhin 2023-01-22 21:32:13 +04:00
parent 99dc99831c
commit 9a74d64b2c
1 changed files with 96 additions and 1 deletions

View File

@ -37,7 +37,101 @@ struct _KeyValue
typedef int NativeScanCode;
/* mapt to convert keyboard native scan code to qt keys */
static QMap<NativeScanCode, _KeyValue> s_nativeScanCodesMap = {
static QMap<NativeScanCode, _KeyValue> s_nativeScanCodesMap =
#if defined(WIN32)
{
{1, {27, 16777216}},
{2, {49, 49}},
{3, {50, 50}},
{4, {51, 51}},
{5, {52, 52}},
{6, {53, 53}},
{7, {54, 54}},
{8, {55, 55}},
{9, {56, 56}},
{10, {57, 57}},
{11, {48, 48}},
{12, {189, 45}},
{13, {187, 61}},
{14, {8, 16777219}},
{15, {9, 16777217}},
{16, {81, 81}},
{17, {87, 87}},
{18, {69, 69}},
{19, {82, 82}},
{20, {84, 84}},
{21, {89, 89}},
{22, {85, 85}},
{23, {73, 73}},
{24, {79, 79}},
{25, {80, 80}},
{26, {219, 91}},
{27, {221, 93}},
{28, {13, 16777220}},
{29, {17, 16777249}},
{30, {65, 65}},
{31, {83, 83}},
{32, {68, 68}},
{33, {70, 70}},
{34, {71, 71}},
{35, {72, 72}},
{36, {74, 74}},
{37, {75, 75}},
{38, {76, 76}},
{39, {186, 59}},
{40, {222, 39}},
{41, {192, 96}},
{42, {16, 16777248}},
{43, {220, 92}},
{44, {90, 90}},
{45, {88, 88}},
{46, {67, 67}},
{47, {86, 86}},
{48, {66, 66}},
{49, {78, 78}},
{50, {77, 77}},
{51, {188, 44}},
{52, {190, 46}},
{53, {191, 47}},
{54, {16, 16777248}},
{55, {106, 42}},
{56, {18, 16777251}},
{58, {20, 16777252}},
{59, {112, 16777264}},
{60, {113, 16777265}},
{61, {114, 16777266}},
{62, {115, 16777267}},
{63, {116, 16777268}},
{64, {117, 16777269}},
{65, {118, 16777270}},
{66, {119, 16777271}},
{67, {120, 16777272}},
{68, {121, 16777273}},
{69, {19, 16777224}},
{70, {145, 16777254}},
{71, {36, 16777232}},
{74, {109, 45}},
{76, {12, 16777227}},
{78, {107, 43}},
{79, {35, 16777233}},
{82, {45, 16777222}},
{83, {46, 16777223}},
{87, {122, 16777274}},
{88, {123, 16777275}},
{256, {176, 16777347}},
{284, {13, 16777221}},
{285, {17, 16777249}},
{309, {111, 47}},
{312, {18, 16777251}},
{325, {144, 16777253}},
{338, {45, 16777222}},
{339, {46, 16777223}},
{347, {91, 16777250}},
{348, {92, 16777250}},
{349, {93, 16777301}},
};
#else
{
{10, {49, 49}},
{11, {50, 50}},
{12, {51, 51}},
@ -129,6 +223,7 @@ static QMap<NativeScanCode, _KeyValue> s_nativeScanCodesMap = {
{119, {65535, 16777223}},
{127, {65299, 16777224}},
};
#endif
#if defined(WIN32)