qt: Map F13/F14/F15 using Apple equivalency again for Apple keyboards on Linux
This commit is contained in:
@@ -18,14 +18,14 @@
|
||||
#include <QtDebug>
|
||||
|
||||
static std::unordered_map<uint32_t, uint16_t> evdev_keycodes = {
|
||||
{99, 0x54}, /* SYSRQ */
|
||||
{184, 0x46}, /* F14 => Scroll Lock (for Apple keyboards) */
|
||||
{86, 0x56}, /* 102ND */
|
||||
{87, 0x57}, /* F11 */
|
||||
{88, 0x58}, /* F12 */
|
||||
{117, 0x59}, /* KPEQUAL */
|
||||
{183, 0x5d}, /* F13 */
|
||||
{184, 0x5e}, /* F14 */
|
||||
{185, 0x5f}, /* F15 */
|
||||
{186, 0x5d}, /* F16 => F13 */
|
||||
{187, 0x5e}, /* F17 => F14 */
|
||||
{188, 0x5f}, /* F18 => F15 */
|
||||
|
||||
/* Japanese keys. */
|
||||
{95, 0x5c}, /* KPJPCOMMA */
|
||||
@@ -47,9 +47,11 @@ static std::unordered_map<uint32_t, uint16_t> evdev_keycodes = {
|
||||
{97, 0x11d}, /* RIGHTCTRL */
|
||||
{98, 0x135}, /* KPSLASH */
|
||||
{99, 0x137}, /* SYSRQ */
|
||||
{183, 0x137}, /* F13 => SysRq (for Apple keyboards) */
|
||||
{100, 0x138}, /* RIGHTALT */
|
||||
{119, 0x145}, /* PAUSE */
|
||||
{411, 0x145}, /* BREAK */
|
||||
{185, 0x145}, /* F15 => Pause (for Apple keyboards) */
|
||||
{102, 0x147}, /* HOME */
|
||||
{103, 0x148}, /* UP */
|
||||
{104, 0x149}, /* PAGEUP */
|
||||
|
@@ -102,6 +102,7 @@ static std::unordered_map<std::string, uint16_t> xkb_keycodes = {
|
||||
|
||||
{"NMLK", 0x45},
|
||||
{"SCLK", 0x46},
|
||||
{"FK14", 0x46}, /* F14 => Scroll Lock (for Apple keyboards) */
|
||||
{"KP7", 0x47},
|
||||
{"KP8", 0x48},
|
||||
{"KP9", 0x49},
|
||||
@@ -119,9 +120,9 @@ static std::unordered_map<std::string, uint16_t> xkb_keycodes = {
|
||||
{"LSGT", 0x56},
|
||||
{"FK11", 0x57},
|
||||
{"FK12", 0x58},
|
||||
{"FK13", 0x5d},
|
||||
{"FK14", 0x5e},
|
||||
{"FK15", 0x5f},
|
||||
{"FK16", 0x5d}, /* F16 => F13 */
|
||||
{"FK17", 0x5e}, /* F17 => F14 */
|
||||
{"FK18", 0x5f}, /* F18 => F15 */
|
||||
|
||||
/* Japanese keys. */
|
||||
{"JPCM", 0x5c}, /* Num, */
|
||||
@@ -146,8 +147,10 @@ static std::unordered_map<std::string, uint16_t> xkb_keycodes = {
|
||||
{"KPDV", 0x135},
|
||||
{"PRSC", 0x137},
|
||||
{"SYRQ", 0x137},
|
||||
{"FK13", 0x137}, /* F13 => SysRq (for Apple keyboards) */
|
||||
{"RALT", 0x138},
|
||||
{"PAUS", 0x145},
|
||||
{"FK15", 0x145}, /* F15 => Pause (for Apple keyboards) */
|
||||
{"BRK", 0x145},
|
||||
{"HOME", 0x147},
|
||||
{"UP", 0x148},
|
||||
|
Reference in New Issue
Block a user