13 {0, 0,
"mr", 38, 0,
NS,
true,
true}, {0, 0,
"m1", 50, 0,
NS,
true,
true}, {0, 0,
"m2", 62, 0,
NS,
true,
true}, {0, 0,
"m3", 74, 0,
NS,
true,
true}, {0,
"Brightness",
"light", 222, 0,
NS,
true,
true}, {0,
"Windows Lock",
"lock", 234, 0,
NS,
true,
true}, {0,
"Mute",
"mute", 273, 0, 13, 8,
true,
true}, {0,
"Volume Up",
"volup", 290, -2, 18, 6,
false,
true}, {0,
"Volume down",
"voldn", 290, 2, 18, 6,
false,
true},
14 {0, 0,
"g1", 0, 14,
NS,
true,
true}, {0, 0,
"g2", 11, 14,
NS,
true,
true}, {0, 0,
"g3", 22, 14,
NS,
true,
true}, {0,
"Esc",
"esc", 38, 14,
NS,
true,
true}, {0, 0,
"f1", 58, 14,
NS,
true,
true}, {0, 0,
"f2", 70, 14,
NS,
true,
true}, {0, 0,
"f3", 82, 14,
NS,
true,
true}, {0, 0,
"f4", 94, 14,
NS,
true,
true}, {0, 0,
"f5", 114, 14,
NS,
true,
true}, {0, 0,
"f6", 126, 14,
NS,
true,
true}, {0, 0,
"f7", 138, 14,
NS,
true,
true}, {0, 0,
"f8", 150, 14,
NS,
true,
true}, {0, 0,
"f9", 170, 14,
NS,
true,
true}, {0, 0,
"f10", 182, 14,
NS,
true,
true}, {0, 0,
"f11", 194, 14,
NS,
true,
true}, {0, 0,
"f12", 206, 14,
NS,
true,
true}, {0,
"Print Screen\nSysRq",
"prtscn", 222, 14,
NS,
true,
true}, {0,
"Scroll Lock",
"scroll", 234, 14,
NS,
true,
true}, {0,
"Pause\nBreak",
"pause", 246, 14,
NS,
true,
true}, {0,
"Stop",
"stop", 262, 14, 12, 8,
true,
true}, {0,
"Previous",
"prev", 273, 14, 13, 8,
true,
true}, {0,
"Play/Pause",
"play", 285, 14, 13, 8,
true,
true}, {0,
"Next",
"next", 296, 14, 12, 8,
true,
true},
15 {0, 0,
"g4", 0, 25,
NS,
true,
true}, {0, 0,
"g5", 11, 25,
NS,
true,
true}, {0, 0,
"g6", 22, 25,
NS,
true,
true}, {0,
"`",
"grave", 38, 27,
NS,
true,
true}, {0, 0,
"1", 50, 27,
NS,
true,
true}, {0, 0,
"2", 62, 27,
NS,
true,
true}, {0, 0,
"3", 74, 27,
NS,
true,
true}, {0, 0,
"4", 86, 27,
NS,
true,
true}, {0, 0,
"5", 98, 27,
NS,
true,
true}, {0, 0,
"6", 110, 27,
NS,
true,
true}, {0, 0,
"7", 122, 27,
NS,
true,
true}, {0, 0,
"8", 134, 27,
NS,
true,
true}, {0, 0,
"9", 146, 27,
NS,
true,
true}, {0, 0,
"0", 158, 27,
NS,
true,
true}, {0,
"-",
"minus", 170, 27,
NS,
true,
true}, {0,
"=",
"equal", 182, 27,
NS,
true,
true}, {0,
"¥",
"yen", 194, 27,
NS,
true,
true}, {0,
"Backspace",
"bspace", 200, 27, 24, 12,
true,
true}, {0,
"Insert",
"ins", 222, 27,
NS,
true,
true}, {0,
"Home",
"home", 234, 27,
NS,
true,
true}, {0,
"Page Up",
"pgup", 246, 27,
NS,
true,
true}, {0,
"Num Lock",
"numlock", 261, 27,
NS,
true,
true}, {0,
"NumPad /",
"numslash", 273, 27,
NS,
true,
true}, {0,
"NumPad *",
"numstar", 285, 27,
NS,
true,
true}, {0,
"NumPad -",
"numminus", 297, 27,
NS,
true,
true},
16 {0, 0,
"g7", 0, 39,
NS,
true,
true}, {0, 0,
"g8", 11, 39,
NS,
true,
true}, {0, 0,
"g9", 22, 39,
NS,
true,
true}, {0,
"Tab",
"tab", 41, 39, 18, 12,
true,
true}, {0, 0,
"q", 56, 39,
NS,
true,
true}, {0, 0,
"w", 68, 39,
NS,
true,
true}, {0, 0,
"e", 80, 39,
NS,
true,
true}, {0, 0,
"r", 92, 39,
NS,
true,
true}, {0, 0,
"t", 104, 39,
NS,
true,
true}, {0, 0,
"y", 116, 39,
NS,
true,
true}, {0, 0,
"u", 128, 39,
NS,
true,
true}, {0, 0,
"i", 140, 39,
NS,
true,
true}, {0, 0,
"o", 152, 39,
NS,
true,
true}, {0, 0,
"p", 164, 39,
NS,
true,
true}, {0,
"[",
"lbrace", 176, 39,
NS,
true,
true}, {0,
"]",
"rbrace", 188, 39,
NS,
true,
true}, {0,
"\\",
"bslash", 203, 39, 18, 12,
true,
true}, {0,
"Enter",
"enter", 203, 39, 18, 24,
true,
true}, {0,
"Delete",
"del", 222, 39,
NS,
true,
true}, {0,
"End",
"end", 234, 39,
NS,
true,
true}, {0,
"Page Down",
"pgdn", 246, 39,
NS,
true,
true}, {0,
"NumPad 7",
"num7", 261, 39,
NS,
true,
true}, {0,
"NumPad 8",
"num8", 273, 39,
NS,
true,
true}, {0,
"NumPad 9",
"num9", 285, 39,
NS,
true,
true}, {0,
"NumPad +",
"numplus", 297, 45, 12, 24,
true,
true},
17 {0, 0,
"g10", 0, 50,
NS,
true,
true}, {0, 0,
"g11", 11, 50,
NS,
true,
true}, {0, 0,
"g12", 22, 50,
NS,
true,
true}, {0,
"Caps Lock",
"caps", 42, 51, 20, 12,
true,
true}, {0, 0,
"a", 59, 51,
NS,
true,
true}, {0, 0,
"s", 71, 51,
NS,
true,
true}, {0, 0,
"d", 83, 51,
NS,
true,
true}, {0, 0,
"f", 95, 51,
NS,
true,
true}, {0, 0,
"g", 107, 51,
NS,
true,
true}, {0, 0,
"h", 119, 51,
NS,
true,
true}, {0, 0,
"j", 131, 51,
NS,
true,
true}, {0, 0,
"k", 143, 51,
NS,
true,
true}, {0, 0,
"l", 155, 51,
NS,
true,
true}, {0,
";",
"colon", 167, 51,
NS,
true,
true}, {0,
"'",
"quote", 179, 51,
NS,
true,
true}, {0,
"#",
"hash", 191, 51,
NS,
true,
true}, {0,
"NumPad 4",
"num4", 261, 51,
NS,
true,
true}, {0,
"NumPad 5",
"num5", 273, 51,
NS,
true,
true}, {0,
"NumPad 6",
"num6", 285, 51,
NS,
true,
true},
18 {0, 0,
"g13", 0, 64,
NS,
true,
true}, {0, 0,
"g14", 11, 64,
NS,
true,
true}, {0, 0,
"g15", 22, 64,
NS,
true,
true}, {0,
"Left Shift",
"lshift", 39, 63, 14, 12,
true,
true}, {
"bslash",
"\\",
"bslash_iso", 53, 63,
NS,
true,
true}, {0, 0,
"z", 65, 63,
NS,
true,
true}, {0, 0,
"x", 77, 63,
NS,
true,
true}, {0, 0,
"c", 89, 63,
NS,
true,
true}, {0, 0,
"v", 101, 63,
NS,
true,
true}, {0, 0,
"b", 113, 63,
NS,
true,
true}, {0, 0,
"n", 125, 63,
NS,
true,
true}, {0, 0,
"m", 137, 63,
NS,
true,
true}, {0,
",",
"comma", 149, 63,
NS,
true,
true}, {0,
".",
"dot", 161, 63,
NS,
true,
true}, {0,
"/",
"slash", 173, 63,
NS,
true,
true}, {0,
"_",
"ro", 185, 63,
NS,
true,
true}, {0,
"Right Shift",
"rshift", 196, 63, 32, 12,
true,
true}, {0,
"Up",
"up", 234, 63,
NS,
true,
true}, {0,
"NumPad 1",
"num1", 261, 63,
NS,
true,
true}, {0,
"NumPad 2",
"num2", 273, 63,
NS,
true,
true}, {0,
"NumPad 3",
"num3", 285, 63,
NS,
true,
true}, {0,
"NumPad Enter",
"numenter", 297, 69, 12, 24,
true,
true},
19 {0, 0,
"g16", 0, 75,
NS,
true,
true}, {0, 0,
"g17", 11, 75,
NS,
true,
true}, {0, 0,
"g18", 22, 75,
NS,
true,
true}, {0,
"Left Ctrl",
"lctrl", 40, 75, 16, 12,
true,
true}, {0,
"Left Windows",
"lwin", 54, 75,
NS,
true,
true}, {0,
"Left Alt",
"lalt", 67, 75, 14, 12,
true,
true}, {0,
"無変換",
"muhenkan", 80, 75,
NS,
true,
true}, {0,
"Space",
"space", 116, 75, 84, 12,
true,
true}, {0,
"変換",
"henkan", 150, 75,
NS,
true,
true}, {0,
"ひらがな カタカナ ローマ字",
"katahira", 162, 75,
NS,
true,
true}, {0,
"Right Alt",
"ralt", 165, 75, 14, 12,
true,
true}, {0,
"Right Windows",
"rwin", 178, 75,
NS,
true,
true}, {0,
"Menu",
"rmenu", 190, 75,
NS,
true,
true}, {0,
"Right Ctrl",
"rctrl", 204, 75, 16, 12,
true,
true}, {0,
"Left",
"left", 222, 75,
NS,
true,
true}, {0,
"Down",
"down", 234, 75,
NS,
true,
true}, {0,
"Right",
"right", 246, 75,
NS,
true,
true}, {0,
"NumPad 0",
"num0", 267, 75, 24, 12,
true,
true}, {0,
"NumPad .",
"numdot", 285, 75,
NS,
true,
true}
21 #define KEYCOUNT_K95 (sizeof(K95Keys) / sizeof(Key))
24 #define ANSI_ENTER_X 199
25 #define ANSI_ENTER_Y 51
26 #define ANSI_ENTER_W 26
27 #define ANSI_ENTER_H 12
28 #define ANSI_LSHIFT_X 45
29 #define ANSI_LSHIFT_W 26
39 {0,
"§",
"grave"}, {0,
"+",
"minus"}, {0,
"´",
"equal"},
40 {0,
"Å",
"lbrace"}, {0,
"¨",
"rbrace"},
41 {0,
"Æ",
"colon"}, {0,
"Ø",
"quote"}, {0,
"'",
"hash"},
42 {0,
"<",
"bslash_iso"}, {0,
"-",
"slash"},
46 {0,
"\\ (R)",
"hash"},
47 {0,
"\\ (L)",
"bslash_iso"},
51 {
"sup2",
"²",
"grave"}, {0,
"&",
"1"}, {0,
"É",
"2"}, {0,
"\"",
"3"}, {0,
"'",
"4"}, {0,
"(",
"5"}, {0,
"-",
"6"}, {0,
"È",
"7"}, {0,
"_",
"8"}, {0,
"Ç",
"9"}, {0,
"À",
"0"}, {
"rparen",
")",
"minus"},
52 {
"a",
"A",
"q"}, {
"z",
"Z",
"w"}, {
"caret",
"^",
"lbrace"}, {
"dollar",
"$",
"rbrace"},
53 {
"q",
"Q",
"a"}, {
"m",
"M",
"colon"}, {
"percent",
"Ù",
"quote"}, {
"star",
"*",
"hash"},
54 {
"angle",
"<",
"bslash_iso"}, {
"w",
"W",
"z"}, {
"comma",
",",
"m"}, {
"semicolon",
";",
"comma"}, {
"colon",
":",
"dot"}, {
"exclam",
"!",
"slash"},
58 {
"caret",
"^",
"grave"}, {
"ss",
"ß",
"minus"}, {
"grave",
"´",
"equal"},
59 {
"z",
"Z",
"y"}, {
"ue",
"Ü",
"lbrace"}, {
"plus",
"+",
"rbrace"},
60 {
"oe",
"Ö",
"colon"}, {
"ae",
"Ä",
"quote"},
61 {
"angle",
"<",
"bslash_iso"}, {
"y",
"Y",
"z"}, {
"minus",
"-",
"slash"}
65 {0,
"\\",
"grave"}, {0,
"'",
"minus"}, {0,
"Ì",
"equal"},
66 {0,
"È",
"lbrace"}, {0,
"+",
"rbrace"},
67 {0,
"Ò",
"colon"}, {0,
"À",
"quote"}, {0,
"Ù",
"hash"},
68 {0,
"<",
"bslash_iso"}, {0,
"-",
"slash"},
72 {0,
"§",
"grave"}, {0,
"+",
"minus"}, {0,
"´",
"equal"},
73 {0,
"Å",
"lbrace"}, {0,
"¨",
"rbrace"},
74 {0,
"Ø",
"colon"}, {0,
"Æ",
"quote"}, {0,
"'",
"hash"},
75 {0,
"<",
"bslash_iso"}, {0,
"-",
"slash"},
79 {0,
"|",
"grave"}, {0,
"'",
"minus"}, {0,
"¿",
"equal"},
80 {0,
"´",
"lbrace"}, {0,
"+",
"rbrace"},
81 {0,
"Ñ",
"colon"}, {0,
"{",
"quote"}, {0,
"}",
"hash"},
82 {0,
"<",
"bslash_iso"}, {0,
"-",
"slash"},
86 {
"quote",
"'",
"grave"},
87 {
"accent",
"´",
"lbrace"}, {
"lbrace",
"[",
"rbrace"},
88 {
"cc",
"Ç",
"colon"}, {
"tilde",
"~",
"quote"}, {
"rbrace",
"]",
"hash"},
89 {
"colon",
";",
"slash"}, {
"slash",
"/",
"ro"}, {
"numcomma",
",",
"numdot"},
93 {
"oa",
"º",
"grave"}, {
"quote",
"'",
"minus"}, {
"lexclam",
"¡",
"equal"},
94 {
"grave",
"`",
"lbrace"}, {
"plus",
"+",
"rbrace"},
95 {
"nn",
"Ñ",
"colon"}, {
"accent",
"´",
"quote"}, {
"cc",
"Ç",
"hash"},
96 {
"angle",
"<",
"bslash_iso"}, {
"minus",
"-",
"slash"},
100 {
"section",
"§",
"grave"}, {
"plus",
"+",
"minus"}, {
"grave",
"´",
"equal"},
101 {
"aa",
"Å",
"lbrace"}, {
"umlaut",
"¨",
"rbrace"},
102 {
"oe",
"Ö",
"colon"}, {
"ae",
"Ä",
"quote"}, {
"quote",
"'",
"hash"},
103 {
"angle",
"<",
"bslash_iso"}, {
"minus",
"-",
"slash"},
112 {0,
"[",
"minus"}, {0,
"]",
"equal"},
113 {0,
"'",
"q"}, {0,
",",
"w"}, {0,
".",
"e"}, {0,
"P",
"r"}, {0,
"Y",
"t"}, {0,
"F",
"y"}, {0,
"G",
"u"}, {0,
"C",
"i"}, {0,
"R",
"o"}, {0,
"L",
"p"}, {0,
"/",
"lbrace"}, {0,
"=",
"rbrace"},
114 {0,
"O",
"s"}, {0,
"E",
"d"}, {0,
"U",
"f"}, {0,
"I",
"g"}, {0,
"D",
"h"}, {0,
"H",
"j"}, {0,
"T",
"k"}, {0,
"N",
"l"}, {0,
"S",
"colon"}, {0,
"-",
"quote"},
115 {0,
";",
"z"}, {0,
"Q",
"x"}, {0,
"J",
"c"}, {0,
"K",
"v"}, {0,
"X",
"b"}, {0,
"B",
"n"}, {0,
"W",
"comma"}, {0,
"V",
"dot"}, {0,
"Z",
"slash"},
119 #define PATCH_COUNT(patch) (sizeof(patch) / sizeof(KeyPatch))
120 #define patch(map, patches) _patch(map, patches, PATCH_COUNT(patches))
121 static void _patch(QHash<QString, Key>& map,
const KeyPatch* patches,
int patchCount){
122 for(
const KeyPatch* p = patches; p < patches + patchCount; p++){
132 map.remove(
"henkan");
133 map.remove(
"muhenkan");
134 map.remove(
"katahira");
139 map.remove(
"bslash");
143 map.remove(
"bslash_iso");
145 Key& enter = map[
"enter"];
150 Key& lshift = map[
"lshift"];
156 map.remove(
"bslash");
159 Key& bspace = map[
"bspace"];
164 Key& rshift = map[
"rshift"];
169 Key& space = map[
"space"];
174 Key& lshift = map[
"lshift"];
178 map.remove(
"bslash_iso");
181 Key& ralt = map[
"ralt"];
190 if(map.contains(
"fn")){
200 map.remove(
"henkan");
201 map.remove(
"muhenkan");
202 map.remove(
"katahira");
203 map.remove(
"bslash");
206 Key& rshift = map[
"rshift"];
212 #define K95_WIDTH 298
213 #define K95_HEIGHT 76
215 #define K95P_HEIGHT 82
216 #define K95P_X_START 20
217 #define K95P_WIDTH (K95_WIDTH - K95P_X_START + 1)
220 #define K70_X_START 38
221 #define K70_WIDTH (K95_WIDTH - K70_X_START)
222 #define K70_HEIGHT K95_HEIGHT
224 #define K68_WIDTH K70_WIDTH
225 #define K68_HEIGHT K70_HEIGHT
228 #define K65_WIDTH 209
229 #define K65_HEIGHT K70_HEIGHT
232 #define K63_WIDTH K65_WIDTH
233 #define K63_HEIGHT K65_HEIGHT
236 {0,
"Volume Down",
"voldn", 285 -
K70_X_START, 0, 13, 8,
true,
true}, {0,
"Volume Up",
"volup", 297 -
K70_X_START, 0, 13, 8,
true,
true},
238 #define K68_TOP_COUNT (sizeof(K68TopRow) / sizeof(Key))
241 {0,
"Brightness",
"light", 164 -
K70_X_START, 0, 12, 12,
true,
true}, {0,
"Mute",
"mute", 176 -
K70_X_START, 0, 12, 12,
true,
true}, {0,
"Volume Down",
"voldn", 192 -
K70_X_START, 0, 14, 8,
true,
true}, {0,
"Volume Up",
"volup", 205 -
K70_X_START, 0, 14, 8,
true,
true}, {0,
"Windows Lock",
"lock", 222 -
K70_X_START, 0, 12, 12,
true,
true}
243 #define K65_TOP_COUNT (sizeof(K65TopRow) / sizeof(Key))
246 {0,
"Stop",
"stop",
K70_X_START - 37, 0, 12, 8,
true,
true}, {0,
"Previous",
"prev",
K70_X_START - 26, 0, 12, 8,
true,
true}, {0,
"Play/Pause",
"play",
K70_X_START - 15, 0, 12, 8,
true,
true}, {0,
"Next",
"next",
K70_X_START - 4, 0, 12, 8,
true,
true}, {0,
"Brightness",
"light", 170 -
K70_X_START, 0, 12, 12,
true,
true}, {0,
"Windows Lock",
"lock", 180 -
K70_X_START, 0, 12, 12,
true,
true}, {0,
"Mute",
"mute", 222 -
K70_X_START, 0, 13, 8,
true,
true}, {0,
"Volume Down",
"voldn", 234 -
K70_X_START, 0, 13, 8,
true,
true}, {0,
"Volume Up",
"volup", 246 -
K70_X_START, 0, 13, 8,
true,
true}
248 #define K63_TOP_COUNT (sizeof(K63TopRow) / sizeof(Key))
251 #define KSTRAFE_X_START 12
252 #define KSTRAFE_WIDTH (K70_WIDTH + (KSTRAFE_X_START * 2))
253 #define KSTRAFE_HEIGHT K95_HEIGHT
259 {0,
"Function",
"fn", 152, 75,
NS,
true,
true}
264 {0,
"Left Mouse",
"mouse1", 8, 0, 14, 32,
false,
true}, {0,
"Right Mouse",
"mouse2", 30, 0, 14, 32,
false,
true}, {0,
"Middle Mouse",
"mouse3", 22, 8, 8, 7,
false,
true},
265 {0,
"Wheel Up",
"wheelup", 22, 4, 8, 5,
false,
true}, {0,
"Wheel Down",
"wheeldn", 22, 14, 8, 5,
false,
true}, {0,
"Wheel Light",
"front", 22, 15, 8, 8,
true,
false},
266 {0,
"DPI Up",
"dpiup", 22, 19, 8, 6,
false,
true}, {0,
"DPI Light",
"dpi", 22, 24, 8, 8,
true,
false}, {0,
"DPI Down",
"dpidn", 22, 31, 8, 6,
false,
true},
267 {0,
"Forward",
"mouse5", 5, 24, 5, 9,
false,
true}, {0,
"Back",
"mouse4", 5, 33, 5, 10,
false,
true}, {0,
"Sniper",
"sniper", 0, 25, 5, 15,
false,
true},
268 {0,
"Logo",
"back", 14, 55, 24, 12,
true,
false}
270 #define KEYCOUNT_M65 (sizeof(M65Keys) / sizeof(Key))
273 #define M65_HEIGHT 67
277 {0,
"Left Mouse",
"mouse1", 8, 0, 14, 32,
false,
true}, {0,
"Right Mouse",
"mouse2", 30, 0, 14, 32,
false,
true}, {0,
"Middle Mouse",
"mouse3", 22, 9, 8, 7,
false,
true}, {0,
"Front light",
"front", 8, -2, 14, 8,
true,
false },
278 {0,
"Wheel Up",
"wheelup", 22, 5, 8, 5,
false,
true}, {0,
"Wheel Down",
"wheeldn", 22, 15, 8, 5,
false,
true}, {0,
"Wheel Light",
"wheel", 22, 5, 8, 15,
true,
false}, {0,
"Extra button",
"thumb1", 22, 20, 8, 18,
false,
true},
279 {0,
"DPI Up",
"dpiup", 5, 3, 5, 7,
false,
true}, {0,
"DPI Down",
"dpidn", 5, 10, 5, 7,
false,
true}, {0,
"DPI Light",
"dpi", 5, 4, 5, 12,
true,
false},
280 {0,
"Forward",
"mouse5", 5, 24, 5, 9,
false,
true}, {0,
"Back",
"mouse4", 5, 33, 5, 10,
false,
true},
281 {0,
"Logo",
"back", 14, 50, 24, 12,
true,
false}
283 #define KEYCOUNT_SABRE (sizeof(SabreKeys) / sizeof(Key))
285 #define SABRE_WIDTH M65_WIDTH
286 #define SABRE_HEIGHT M65_HEIGHT
290 {0,
"Left Mouse",
"mouse1", 10, 5, 14, 26,
false,
true}, {0,
"Right Mouse",
"mouse2", 30, 5, 14, 26,
false,
true}, {0,
"Middle Mouse",
"mouse3", 25, 11, 6, 7,
false,
true},
291 {0,
"Wheel Up",
"wheelup", 25, 7, 6, 5,
false,
true}, {0,
"Wheel Down",
"wheeldn", 25, 17, 6, 5,
false,
true},
292 {0,
"DPI Cycle",
"dpiup", 25, 23, 6, 10,
false,
true}, {0,
"Logo Light",
"dpi", 17, 40, 20, 20,
true,
false},
293 {0,
"Forward",
"mouse5", 3, 24, 5, 10,
false,
true}, {0,
"Back",
"mouse4", 3, 33, 5, 10,
false,
true}
295 #define KEYCOUNT_HARPOON (sizeof(HarpoonKeys) / sizeof(Key))
297 #define HARPOON_WIDTH M65_WIDTH
298 #define HARPOON_HEIGHT M65_HEIGHT
302 {0,
"Left Mouse",
"mouse1", 17, 3, 14, 18,
false,
true}, {0,
"Right Mouse",
"mouse2", 37, 3, 14, 18,
false,
true}, {0,
"Middle Mouse",
"mouse3", 31, 9, 7, 7,
false,
true}, {0,
"Front light",
"front", 16, -5, 36, 8,
true,
false },
303 {0,
"Wheel Up",
"wheelup", 31, 5, 7, 5,
false,
true}, {0,
"Wheel Down",
"wheeldn", 31, 15, 7, 5,
false,
true}, {0,
"Side Lights",
"side", 22, 24, 7, 20,
true,
false},
304 {0,
"DPI Cycle",
"dpiup", 31, 19, 6, 12,
false,
true}, {0,
"Logo Light",
"back", 24, 43, 20, 20,
true,
false},
305 {0,
"Forward",
"mouse5", 15, 22, 5, 11,
false,
true}, {0,
"Back",
"mouse4", 15, 32, 5, 11,
false,
true}
307 #define KEYCOUNT_GLAIVE (sizeof(GlaiveKeys) / sizeof(Key))
309 #define GLAIVE_WIDTH M65_WIDTH
310 #define GLAIVE_HEIGHT M65_HEIGHT
314 {0,
"Left Mouse",
"mouse1", 8, 0, 14, 32,
false,
true}, {0,
"Right Mouse",
"mouse2", 30, 0, 12, 32,
false,
true}, {0,
"Middle Mouse",
"mouse3", 22, 9, 8, 6,
false,
true}, {0,
"Front light",
"front", 30, 0, 12, 8,
true,
false },
315 {0,
"Wheel Up",
"wheelup", 22, 3, 8, 6,
false,
true}, {0,
"Wheel Down",
"wheeldn", 22, 14, 8, 6,
false,
true}, {0,
"Wheel Light",
"wheel", 22, 3, 8, 17,
true,
false},
316 {0,
"DPI Up",
"dpiup", 22, 19, 8, 9,
false,
true}, {0,
"DPI Light",
"dpi", 1, 12, 8, 4,
true,
false}, {0,
"DPI Down",
"dpidn", 22, 28, 8, 9,
false,
true},
317 {0,
"Thumb light",
"thumb", 0, 21, 10, 24,
true,
false},
318 {0,
"1",
"thumb1", -13, 18, 7, 7,
false,
true}, {0,
"2",
"thumb2", -6, 18, 7, 7,
false,
true}, {0,
"3",
"thumb3", 1, 18, 7, 7,
false,
true},
319 {0,
"4",
"thumb4", -13, 25, 7, 7,
false,
true}, {0,
"5",
"thumb5", -6, 25, 7, 7,
false,
true}, {0,
"6",
"thumb6", 1, 25, 7, 7,
false,
true},
320 {0,
"7",
"thumb7", -13, 32, 7, 7,
false,
true}, {0,
"8",
"thumb8", -6, 32, 7, 7,
false,
true}, {0,
"9",
"thumb9", 1, 32, 7, 7,
false,
true},
321 {0,
"10",
"thumb10", -13, 39, 7, 7,
false,
true}, {0,
"11",
"thumb11", -6, 39, 7, 7,
false,
true}, {0,
"12",
"thumb12", 1, 39, 7, 7,
false,
true},
322 {0,
"Logo",
"back", 14, 50, 24, 16,
true,
false}
324 #define KEYCOUNT_SCIM (sizeof(ScimKeys) / sizeof(Key))
326 #define SCIM_WIDTH M65_WIDTH
327 #define SCIM_HEIGHT M65_HEIGHT
331 {0, 0,
"topbar1", 4, -3,
LBS,
true,
false}, {0, 0,
"topbar2", 19, -3,
LBS,
true,
false}, {0, 0,
"topbar3", 34, -3,
LBS,
true,
false}, {0, 0,
"topbar4", 49, -3,
LBS,
true,
false}, {0, 0,
"topbar5", 64, -3,
LBS,
true,
false}, {0, 0,
"topbar6", 79, -3,
LBS,
true,
false},
332 {0, 0,
"topbar7", 94, -3,
LBS,
true,
false}, {0, 0,
"topbar8", 109, -3,
LBS,
true,
false}, {0, 0,
"topbar9", 124, -3,
LBS,
true,
false}, {0, 0,
"topbar10", 139, -3,
LBS,
true,
false}, {0, 0,
"topbar11", 154, -3,
LBS,
true,
false}, {0, 0,
"topbar12", 169, -3,
LBS,
true,
false},
333 {0, 0,
"topbar13", 184, -3,
LBS,
true,
false}, {0, 0,
"topbar14", 199, -3,
LBS,
true,
false}, {0, 0,
"topbar15", 214, -3,
LBS,
true,
false}, {0, 0,
"topbar16", 229, -3,
LBS,
true,
false}, {0, 0,
"topbar17", 244, -3,
LBS,
true,
false}, {0, 0,
"topbar18", 259, -3,
LBS,
true,
false},
334 {0, 0,
"topbar19", 274, -3,
LBS,
true,
false},
336 #define LBARCOUNT_K95P (sizeof(K95PLbar) / sizeof(Key))
340 #define N_MODELS KeyMap::_MODEL_MAX
341 #define N_LAYOUTS KeyMap::_LAYOUT_MAX
346 return QHash<QString, Key>();
367 patch(map, patchDvorak);
373 patch(map, patchDvorak);
391 patch(map, patchPTBR);
454 map[
"mr"].height = 8;
455 map[
"light"].height = 8;
456 map[
"lock"].height = 8;
457 map[
"mr"].width = 11;
458 map[
"light"].width = 11;
459 map[
"lock"].width = 11;
462 map[
"voldn"].x -= 11;
463 map[
"volup"].x -= 11;
472 QMutableHashIterator<QString, Key> i(map);
487 QMutableHashIterator<QString, Key> i(map);
513 QMutableHashIterator<QString, Key> i(map);
523 map[
"fn"] = KStrafeKeys[3];
535 QMutableHashIterator<QString, Key> i(map);
555 QMutableHashIterator<QString, Key> i(map);
561 map[
"lsidel"] = KStrafeKeys[0];
562 map[
"rsidel"] = KStrafeKeys[1];
563 map[
"logo"] = KStrafeKeys[2];
564 map[
"fn"] = KStrafeKeys[3];
587 translatedKey.
x += translatedKey.
width / 2;
588 translatedKey.
y += translatedKey.
height / 2;
589 map[
key->
name] = translatedKey;
599 translatedKey.
x += translatedKey.
width / 2;
600 translatedKey.
y += translatedKey.
height / 2;
601 map[
key->
name] = translatedKey;
609 translatedKey.
x += translatedKey.
width / 2;
610 translatedKey.
y += translatedKey.
height / 2;
611 map[
key->
name] = translatedKey;
619 translatedKey.
x += translatedKey.
width / 2;
620 translatedKey.
y += translatedKey.
height / 2;
621 map[
key->
name] = translatedKey;
629 translatedKey.
x += translatedKey.
width / 2;
630 translatedKey.
y += translatedKey.
height / 2;
631 map[
key->
name] = translatedKey;
642 setlocale(LC_ALL,
"");
643 QString loc = setlocale(LC_CTYPE, 0);
644 loc = loc.toLower().replace(
'_',
'-');
645 if(loc.startsWith(
"dk-"))
647 else if(loc.startsWith(
"fr-"))
649 else if(loc.startsWith(
"de-"))
651 else if(loc.startsWith(
"it-"))
653 else if(loc.startsWith(
"ja-"))
655 else if(loc.startsWith(
"pl-"))
657 else if(loc.startsWith(
"pt-br"))
659 else if(loc.startsWith(
"no-"))
661 else if(loc.startsWith(
"es-es"))
664 else if(loc.startsWith(
"es-"))
667 else if(loc.startsWith(
"se-"))
669 else if(loc.startsWith(
"en-us") || loc.startsWith(
"en-au") || loc.startsWith(
"en-ca") || loc.startsWith(
"en-hk") || loc.startsWith(
"en-in") || loc.startsWith(
"en-nz") || loc.startsWith(
"en-ph") || loc.startsWith(
"en-sg") || loc.startsWith(
"en-za"))
678 QString lower = name.toLower();
683 if(lower ==
"eu_dvorak")
685 if(lower ==
"gb_dvorak")
689 if(lower ==
"us_dvorak")
760 <<
"English (ISO/European)" <<
"English (ISO/European, Dvorak)"
761 <<
"English (United Kingdom)" <<
"English (United Kingdom, Dvorak)"
762 <<
"English (United States)" <<
"English (United States, Dvorak)"
769 <<
"Portuguese (Brazil)"
770 <<
"Spanish (Latin America)"
776 QString lower = name.toLower();
789 if(lower ==
"strafe")
795 if(lower ==
"scimitar")
797 if(lower ==
"harpoon")
799 if(lower ==
"glaive")
836 QStringList list = name.trimmed().split(
" ");
837 if(list.length() != 2)
892 _keys(
getMap(_keyModel, _keyLayout)),
893 keyWidth(modelWidth(_keyModel)), keyHeight(modelHeight(_keyModel)),
894 keyModel(_keyModel), keyLayout(_keyLayout)
898 keyWidth(0), keyHeight(0),
899 keyModel(NO_MODEL), keyLayout(NO_LAYOUT)
904 QMap<int, QMap<int, QString> > ordered;
905 QHashIterator<QString, Key> i(*
this);
908 const Key&
key = i.value();
909 ordered[key.
y][key.
x] = i.key();
913 QMapIterator<int, QMap<int, QString> >
y(ordered);
916 QMapIterator<int, QString>
x(y.value());
939 if(key ==
"f13" || key ==
"f14" || key ==
"f15" || key ==
"f16" || key ==
"f17" || key ==
"f18" || key ==
"f19" || key ==
"f20")
940 return key.toUpper();
941 else if(key ==
"lightup")
942 return "Screen Brightness Up";
943 else if(key ==
"lightdn")
944 return "Screen Brightness Down";
945 else if(key ==
"eject" || key ==
"power")
946 return key[0].toUpper() + key.mid(1);
static const KeyPatch patchDE[]
static QHash< QString, Key > getMap(KeyMap::Model model, KeyMap::Layout layout)
static void patchJP106(QHash< QString, Key > &map)
static const KeyPatch patchEU[]
QStringList byPosition() const
static void patchABNT2(QHash< QString, Key > &map)
static QString friendlyName(const QString &key, Layout layout=US)
static const KeyPatch patchFR[]
static const KeyPatch patchJP[]
const char * _storageName
static QStringList layoutNames()
static const Key K65TopRow[]
static const KeyPatch patchMX[]
static Model getModel(const QString &name)
static const Key K95PLbar[]
static const KeyPatch patchIT[]
static const Key GlaiveKeys[]
bool contains(const QString &name) const
static const Key K68TopRow[]
const char * _storageName
static const KeyPatch patchDK[]
static const Key KStrafeKeys[]
static Layout getLayout(const QString &name)
static const KeyPatch patchES[]
static void patchISO(QHash< QString, Key > &map)
static QHash< QString, Key > standardMaps[KeyMap::_MODEL_MAX][KeyMap::_LAYOUT_MAX]
static void patchANSI(QHash< QString, Key > &map)
static const Key K95Keys[]
const QHash< QString, Key > & map() const
static const KeyPatch patchPTBR[]
static QHash< QString, Key > K95BaseMap
static void patchnonJP106(QHash< QString, Key > &map)
#define patch(map, patches)
static int modelWidth(Model model)
const char * _friendlyName
static const KeyPatch patchNO[]
static const Key M65Keys[]
static void patchJP106fn(QHash< QString, Key > &map)
static const Key SabreKeys[]
static const Key ScimKeys[]
static KeyMap fromName(const QString &name)
static int modelHeight(Model model)
const char * _friendlyName
static void _patch(QHash< QString, Key > &map, const KeyPatch *patches, int patchCount)
static const Key K63TopRow[]
static const Key HarpoonKeys[]
static const KeyPatch patchSE[]
static const KeyPatch patchDvorak[]