Keyboard firmwares for Atmel AVR and Cortex-M
Du kannst nicht mehr als 25 Themen auswählen Themen müssen mit entweder einem Buchstaben oder einer Ziffer beginnen. Sie können Bindestriche („-“) enthalten und bis zu 35 Zeichen lang sein.

keymap_editor.js 37KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527
  1. /*
  2. * TMK keymap editor
  3. */
  4. /*
  5. * Share URL
  6. */
  7. function encode_keymap(keymap)
  8. {
  9. return window.btoa(JSON.stringify(keymap));
  10. }
  11. function decode_keymap(hash)
  12. {
  13. try {
  14. return JSON.parse(window.atob(hash));
  15. } catch (err) {
  16. return null;
  17. }
  18. }
  19. /*
  20. * Hex file
  21. */
  22. function hexstr2(b)
  23. {
  24. return ('0'+ b.toString(16)).substr(-2).toUpperCase();
  25. }
  26. function hex_line(address, record_type, data)
  27. {
  28. var sum = 0;
  29. sum += data.length;
  30. sum += (address >> 8);
  31. sum += (address & 0xff);
  32. sum += record_type;
  33. var line = '';
  34. line += ':';
  35. line += hexstr2(data.length);
  36. line += hexstr2(address >> 8);
  37. line += hexstr2(address & 0xff);
  38. line += hexstr2(record_type);
  39. for (var i = 0; i < data.length; i++) {
  40. sum = (sum + data[i]);
  41. line += hexstr2(data[i]);
  42. }
  43. line += hexstr2((~sum + 1)&0xff); // Checksum
  44. line +="\r\n";
  45. return line;
  46. }
  47. function hex_eof()
  48. {
  49. return ":00000001FF\r\n";
  50. }
  51. /*
  52. function flatten(array)
  53. {
  54. };
  55. */
  56. function hex_output(address, data) {
  57. var output = '';
  58. var line = [];
  59. // TODO: refine: flatten data into one dimension array
  60. [].concat.apply([], [].concat.apply([], data)).forEach(function(e) {
  61. line.push(e);
  62. if (line.length == 16) {
  63. output += hex_line(address, 0x00, line);
  64. address += 16;
  65. line.length = 0; // clear array
  66. }
  67. });
  68. if (line.length > 0) {
  69. output += hex_line(address, 0x00, line);
  70. }
  71. return output;
  72. }
  73. /*
  74. * Source file
  75. */
  76. function source_output(keymaps) {
  77. var output = '';
  78. // fn actions
  79. output += "/*\n";
  80. output += " * Keymap for " + KEYBOARD_ID + "\n";;
  81. output += " * generated by tmk keymap editor\n";
  82. output += " */\n";
  83. output += "#include <stdint.h>\n";
  84. output += "#include <stdbool.h>\n";
  85. output += "#include <avr/pgmspace.h>\n";
  86. output += "#include \"keycode.h\"\n";
  87. output += "#include \"action.h\"\n";
  88. output += "#include \"action_macro.h\"\n";
  89. output += "#include \"keymap.h\"\n\n";
  90. output += "#ifdef KEYMAP_SECTION\n";
  91. output += "const uint16_t fn_actions[] __attribute__ ((section (\".keymap.fn_actions\"))) = {\n";
  92. output += "#else\n";
  93. output += "static const uint16_t fn_actions[] PROGMEM = {\n";
  94. output += "#endif\n";
  95. output += " [0] = ACTION_LAYER_MOMENTARY(1),\n";
  96. output += " [1] = ACTION_LAYER_MOMENTARY(2),\n";
  97. output += " [2] = ACTION_LAYER_MOMENTARY(3),\n";
  98. output += " [3] = ACTION_LAYER_MOMENTARY(4),\n";
  99. output += " [4] = ACTION_LAYER_MOMENTARY(5),\n";
  100. output += " [5] = ACTION_LAYER_MOMENTARY(6),\n";
  101. output += " [6] = ACTION_LAYER_MOMENTARY(7),\n";
  102. output += " [7] = ACTION_LAYER_TOGGLE(1),\n";
  103. output += " [8] = ACTION_LAYER_TOGGLE(2),\n";
  104. output += " [9] = ACTION_LAYER_TOGGLE(3),\n";
  105. output += " [10] = ACTION_LAYER_TAP_TOGGLE(1),\n";
  106. output += " [11] = ACTION_LAYER_TAP_TOGGLE(2),\n";
  107. output += " [12] = ACTION_LAYER_TAP_TOGGLE(3),\n";
  108. output += " [13] = ACTION_LAYER_TAP_KEY(1, KC_A),\n";
  109. output += " [14] = ACTION_LAYER_TAP_KEY(2, KC_F),\n";
  110. output += " [15] = ACTION_LAYER_TAP_KEY(3, KC_J),\n";
  111. output += " [16] = ACTION_LAYER_TAP_KEY(4, KC_SPACE),\n";
  112. output += " [17] = ACTION_LAYER_TAP_KEY(5, KC_SCOLON),\n";
  113. output += " [18] = ACTION_LAYER_TAP_KEY(6, KC_QUOTE),\n";
  114. output += " [19] = ACTION_LAYER_TAP_KEY(7, KC_SLASH),\n";
  115. output += " [20] = ACTION_MODS_TAP_KEY(MOD_LSFT, KC_SPACE),\n";
  116. output += " [21] = ACTION_MODS_TAP_KEY(MOD_LCTL, KC_SPACE),\n";
  117. output += " [22] = ACTION_MODS_TAP_KEY(MOD_RCTL, KC_QUOTE),\n";
  118. output += " [23] = ACTION_MODS_TAP_KEY(MOD_RCTL, KC_ENTER),\n";
  119. output += " [24] = ACTION_MODS_TAP_KEY(MOD_LCTL, KC_ESC),\n";
  120. output += " [25] = ACTION_MODS_TAP_KEY(MOD_LCTL, KC_BSPACE),\n";
  121. output += " [26] = ACTION_MODS_ONESHOT(MOD_LCTL),\n";
  122. output += " [27] = ACTION_MODS_TAP_KEY(MOD_LSFT, KC_ESC),\n";
  123. output += " [28] = ACTION_MODS_TAP_KEY(MOD_LSFT, KC_BSPACE),\n";
  124. output += " [29] = ACTION_MODS_ONESHOT(MOD_LSFT),\n";
  125. output += " [30] = ACTION_MODS_TAP_KEY(MOD_RSFT, KC_GRAVE),\n";
  126. output += " [31] = ACTION_MODS_TAP_KEY(MOD_RSFT, KC_BSLASH),\n";
  127. output += "};\n\n";
  128. // keymaps
  129. output += "#ifdef KEYMAP_SECTION\n";
  130. output += "const uint8_t keymaps[][";
  131. output += keymaps[0].length; // row
  132. output += "][";
  133. output += keymaps[0][0].length; // col
  134. output += "] __attribute__ ((section (\".keymap.keymaps\"))) = {\n";
  135. output += "#else\n";
  136. output += "static const uint8_t keymaps[][";
  137. output += keymaps[0].length; // row
  138. output += "][";
  139. output += keymaps[0][0].length; // col
  140. output += "] PROGMEM = {\n";
  141. output += "#endif\n";
  142. for (var i in keymaps) {
  143. output += " {\n";
  144. for (var j in keymaps[i]) {
  145. output += " { ";
  146. for (var k in keymaps[i][j]) {
  147. output += '0x' + ('0' + keymaps[i][j][k].toString(16)).substr(-2);
  148. output += ',';
  149. }
  150. output += " },\n";
  151. }
  152. output += " },\n";
  153. }
  154. output += "};\n\n";
  155. output += "/* translates key to keycode */\n";
  156. output += "uint8_t keymap_key_to_keycode(uint8_t layer, key_t key)\n";
  157. output += "{\n";
  158. output += " return pgm_read_byte(&keymaps[(layer)][(key.row)][(key.col)]);\n";
  159. output += "}\n";
  160. output += "\n";
  161. output += "/* translates Fn index to action */\n";
  162. output += "action_t keymap_fn_to_action(uint8_t keycode)\n";
  163. output += "{\n";
  164. output += " action_t action;\n";
  165. output += " if (FN_INDEX(keycode) < sizeof(fn_actions) / sizeof(fn_actions[0])) {\n";
  166. output += " action.code = pgm_read_word(&fn_actions[FN_INDEX(keycode)]);\n";
  167. output += " } else {\n";
  168. output += " action.code = ACTION_NO;\n";
  169. output += " }\n";
  170. output += " return action;\n";
  171. output += "}\n";
  172. return output;
  173. };
  174. /*
  175. * keycodes
  176. */
  177. var code_display = [
  178. // {id, name(text), description(tooltip)}
  179. {id: 'NO ', name: 'NO', desc: 'No action'},
  180. {id: 'TRNS', name: 'TRNS', desc: 'Transparent'},
  181. {id: 'POST_FAIL', name: 'POST_FAIL', desc: 'POST_FAIL'},
  182. {id: 'UNDEFINED', name: 'UNDEFINED', desc: 'UNDEFINED'},
  183. {id: 'A', name: 'A', desc: 'A'},
  184. {id: 'B', name: 'B', desc: 'B'},
  185. {id: 'C', name: 'C', desc: 'C'},
  186. {id: 'D', name: 'D', desc: 'D'},
  187. {id: 'E', name: 'E', desc: 'E'},
  188. {id: 'F', name: 'F', desc: 'F'},
  189. {id: 'G', name: 'G', desc: 'G'},
  190. {id: 'H', name: 'H', desc: 'H'},
  191. {id: 'I', name: 'I', desc: 'I'},
  192. {id: 'J', name: 'J', desc: 'J'},
  193. {id: 'K', name: 'K', desc: 'K'},
  194. {id: 'L', name: 'L', desc: 'L'},
  195. {id: 'M', name: 'M', desc: 'M'},
  196. {id: 'N', name: 'N', desc: 'N'},
  197. {id: 'O', name: 'O', desc: 'O'},
  198. {id: 'P', name: 'P', desc: 'P'},
  199. {id: 'Q', name: 'Q', desc: 'Q'},
  200. {id: 'R', name: 'R', desc: 'R'},
  201. {id: 'S', name: 'S', desc: 'S'},
  202. {id: 'T', name: 'T', desc: 'T'},
  203. {id: 'U', name: 'U', desc: 'U'},
  204. {id: 'V', name: 'V', desc: 'V'},
  205. {id: 'W', name: 'W', desc: 'W'},
  206. {id: 'X', name: 'X', desc: 'X'},
  207. {id: 'Y', name: 'Y', desc: 'Y'},
  208. {id: 'Z', name: 'Z', desc: 'Z'},
  209. {id: '1', name: '1', desc: '1'},
  210. {id: '2', name: '2', desc: '2'},
  211. {id: '3', name: '3', desc: '3'},
  212. {id: '4', name: '4', desc: '4'},
  213. {id: '5', name: '5', desc: '5'},
  214. {id: '6', name: '6', desc: '6'},
  215. {id: '7', name: '7', desc: '7'},
  216. {id: '8', name: '8', desc: '8'},
  217. {id: '9', name: '9', desc: '9'},
  218. {id: '0', name: '0', desc: '0'},
  219. {id: 'ENT', name: 'Enter', desc: 'ENTER'},
  220. {id: 'ESC', name: 'Esc', desc: 'Escape'},
  221. {id: 'BSPC', name: 'Back space', desc: 'Backspace'},
  222. {id: 'TAB', name: 'Tab', desc: 'Tab'},
  223. {id: 'SPC', name: 'Space', desc: 'Space'},
  224. {id: 'MINS', name: '-', desc: 'MINUS'},
  225. {id: 'EQL', name: '=', desc: 'EQUAL'},
  226. {id: 'LBRC', name: '[', desc: 'Left Bracket'},
  227. {id: 'RBRC', name: ']', desc: 'Right Bracket'},
  228. {id: 'BSLS', name: "\\", desc: 'Backslash'},
  229. {id: 'NUHS', name: 'ISO #', desc: 'Non-US Hash'},
  230. {id: 'SCLN', name: ';', desc: 'Semicolon'},
  231. {id: 'QUOT', name: "'", desc: 'Quote'},
  232. {id: 'GRV ', name: '`', desc: 'Grave'},
  233. {id: 'COMM', name: ',', desc: 'Comma'},
  234. {id: 'DOT ', name: '.', desc: 'Dot'},
  235. {id: 'SLSH', name: '/', desc: 'Slash'},
  236. {id: 'CAPS', name: 'Caps Lock', desc: 'Need this? Sure? :)'},
  237. {id: 'F1 ', name: 'F1', desc: 'F1'},
  238. {id: 'F2 ', name: 'F2', desc: 'F2'},
  239. {id: 'F3 ', name: 'F3', desc: 'F3'},
  240. {id: 'F4 ', name: 'F4', desc: 'F4'},
  241. {id: 'F5 ', name: 'F5', desc: 'F5'},
  242. {id: 'F6 ', name: 'F6', desc: 'F6'},
  243. {id: 'F7 ', name: 'F7', desc: 'F7'},
  244. {id: 'F8 ', name: 'F8', desc: 'F8'},
  245. {id: 'F9 ', name: 'F9', desc: 'F9'},
  246. {id: 'F10 ', name: 'F10', desc: 'F10'},
  247. {id: 'F11 ', name: 'F11', desc: 'F11'},
  248. {id: 'F12 ', name: 'F12', desc: 'F12'},
  249. {id: 'PSCR', name: 'Print Screen', desc: 'Print Screen'},
  250. {id: 'SLCK', name: 'Scroll Lock', desc: 'Scroll Lock'},
  251. {id: 'PAUS', name: 'Pause', desc: 'Pause'},
  252. {id: 'INS ', name: 'Insert', desc: 'Insert'},
  253. {id: 'HOME', name: 'Home', desc: 'Home'},
  254. {id: 'PGUP', name: 'Page Up', desc: 'Page Up'},
  255. {id: 'DEL ', name: 'Delete', desc: 'Delete'},
  256. {id: 'END ', name: 'End', desc: 'End'},
  257. {id: 'PGDN', name: 'Page Down', desc: 'Page Down'},
  258. {id: 'RGHT', name: '\u2192', desc: 'Right'},
  259. {id: 'LEFT', name: '\u2190', desc: 'Left'},
  260. {id: 'DOWN', name: '\u2193', desc: 'Down'},
  261. {id: 'UP ', name: '\u2191', desc: 'Up'},
  262. {id: 'NLCK', name: 'Num Lock', desc: 'Num Lock'},
  263. {id: 'PSLS', name: 'P/', desc: 'Keypad Slash'},
  264. {id: 'PAST', name: 'P*', desc: 'Keypad Asterisk'},
  265. {id: 'PMNS', name: 'P-', desc: 'Keypad Minus'},
  266. {id: 'PPLS', name: 'P+', desc: 'Keypad Plus'},
  267. {id: 'PENT', name: 'P\u21A9', desc: 'Keypad Enter'},
  268. {id: 'P1 ', name: 'P1', desc: 'Keypad 1'},
  269. {id: 'P2 ', name: 'P2', desc: 'Keypad 2'},
  270. {id: 'P3 ', name: 'P3', desc: 'Keypad 3'},
  271. {id: 'P4 ', name: 'P4', desc: 'Keypad 4'},
  272. {id: 'P5 ', name: 'P5', desc: 'Keypad 5'},
  273. {id: 'P6 ', name: 'P6', desc: 'Keypad 6'},
  274. {id: 'P7 ', name: 'P7', desc: 'Keypad 7'},
  275. {id: 'P8 ', name: 'P8', desc: 'Keypad 8'},
  276. {id: 'P9 ', name: 'P9', desc: 'Keypad 9'},
  277. {id: 'P0 ', name: 'P0', desc: 'Keypad 0'},
  278. {id: 'PDOT', name: 'P.', desc: 'Keypad Dot'},
  279. {id: 'NUBS', name: 'ISO \\', desc: 'Non-US Backslash'},
  280. {id: 'APP ', name: 'Application', desc: 'Application'},
  281. {id: 'POWER', name: '_Power', desc: 'Power(Not work on Windows)'},
  282. {id: 'PEQL', name: 'P=', desc: 'Keymapd Equal'},
  283. {id: 'F13 ', name: 'F13', desc: 'F13'},
  284. {id: 'F14 ', name: 'F14', desc: 'F14'},
  285. {id: 'F15 ', name: 'F15', desc: 'F15'},
  286. {id: 'F16 ', name: 'F16', desc: 'F16'},
  287. {id: 'F17 ', name: 'F17', desc: 'F17'},
  288. {id: 'F18 ', name: 'F18', desc: 'F18'},
  289. {id: 'F19 ', name: 'F19', desc: 'F19'},
  290. {id: 'F20 ', name: 'F20', desc: 'F20'},
  291. {id: 'F21 ', name: 'F21', desc: 'F21'},
  292. {id: 'F22 ', name: 'F22', desc: 'F22'},
  293. {id: 'F23 ', name: 'F23', desc: 'F23'},
  294. {id: 'F24 ', name: 'F24', desc: 'F24'},
  295. {id: 'EXECUTE', name: 'EXECUTE', desc: 'EXECUTE'},
  296. {id: 'HELP', name: 'HELP', desc: 'HELP'},
  297. {id: 'MENU', name: 'MENU', desc: 'MENU'},
  298. {id: 'SELECT', name: 'SELECT', desc: 'SELECT'},
  299. {id: 'STOP', name: 'STOP', desc: 'STOP'},
  300. {id: 'AGAIN', name: 'AGAIN', desc: 'AGAIN'},
  301. {id: 'UNDO', name: 'UNDO', desc: 'UNDO'},
  302. {id: 'CUT', name: 'CUT', desc: 'CUT'},
  303. {id: 'COPY', name: 'COPY', desc: 'COPY'},
  304. {id: 'PASTE', name: 'PASTE', desc: 'PASTE'},
  305. {id: 'FIND', name: 'FIND', desc: 'FIND'},
  306. {id: '_MUTE', name: '_MUTE', desc: '_MUTE(Not work on Windows)'},
  307. {id: '_VOLUP', name: '_VOLUP', desc: '_VOLUP(Not work on Windows)'},
  308. {id: '_VOLDOWN', name: '_VOLDOWN', desc: '_VOLDOWN(Not work on Windows)'},
  309. {id: 'LCAP', name: 'Locking Caps Lock', desc: 'Locking Caps Lock'},
  310. {id: 'LNUM', name: 'Locking Num Lock', desc: 'Locking Num Lock'},
  311. {id: 'LSCR', name: 'Locking Scroll Lock', desc: 'Locking Scroll Lock'},
  312. {id: 'PCMM', name: 'P,', desc: 'Keypad Comma'},
  313. {id: 'KP_EQUAL_AS400', name: 'P= (AS400)', desc: 'Keypad Equal (AS400)'},
  314. {id: 'INT1', name: '\u308D', desc: 'Japanese RO'},
  315. {id: 'INT2', name: '\u3072\u3089\u304c\u306a', desc: 'Japanese Hiragana'},
  316. {id: 'INT3', name: '\uffe5', desc: 'Japanese Yen'},
  317. {id: 'INT4', name: '\u5909\u63db', desc: 'Japanese Henkan'},
  318. {id: 'INT5', name: '\u7121\u5909\u63db', desc: 'Japanese Muhenkan'},
  319. {id: 'INT6', name: 'INT6', desc: 'INT6'},
  320. {id: 'INT7', name: 'INT7', desc: 'INT7'},
  321. {id: 'INT8', name: 'INT8', desc: 'INT8'},
  322. {id: 'INT9', name: 'INT9', desc: 'INT9'},
  323. {id: 'LANG1', name: '\ud55c/\uc601', desc: 'Korean Hangul/English'},
  324. {id: 'LANG2', name: '\ud55c\uc790', desc: 'Korean Hanja'},
  325. {id: 'LANG3', name: 'LANG3', desc: 'LANG3'},
  326. {id: 'LANG4', name: 'LANG4', desc: 'LANG4'},
  327. {id: 'LANG5', name: 'LANG5', desc: 'LANG5'},
  328. {id: 'LANG6', name: 'LANG6', desc: 'LANG6'},
  329. {id: 'LANG7', name: 'LANG7', desc: 'LANG7'},
  330. {id: 'LANG8', name: 'LANG8', desc: 'LANG8'},
  331. {id: 'LANG9', name: 'LANG9', desc: 'LANG9'},
  332. {id: 'ALT_ERASE', name: 'ALT_ERASE', desc: 'ALT_ERASE'},
  333. {id: 'SYSREQ', name: 'SYSREQ', desc: 'SYSREQ'},
  334. {id: 'CANCEL', name: 'CANCEL', desc: 'CANCEL'},
  335. {id: 'CLEAR', name: 'CLEAR', desc: 'CLEAR'},
  336. {id: 'PRIOR', name: 'PRIOR', desc: 'PRIOR'},
  337. {id: 'RETURN', name: 'RETURN', desc: 'RETURN'},
  338. {id: 'SEPARATOR', name: 'SEPARATOR', desc: 'SEPARATOR'},
  339. {id: 'OUT', name: 'OUT', desc: 'OUT'},
  340. {id: 'OPER', name: 'OPER', desc: 'OPER'},
  341. {id: 'CLEAR_AGAIN', name: 'CLEAR_AGAIN', desc: 'CLEAR_AGAIN'},
  342. {id: 'CRSEL', name: 'CRSEL', desc: 'CRSEL'},
  343. {id: 'EXSEL', name: 'EXSEL', desc: 'EXSEL'},
  344. /* System & Media key 165-191(0xa5-bf) */
  345. {id: 'PWR ', name: 'Sys Power', desc: 'System Power'},
  346. {id: 'SLEP', name: 'Sys Sleep', desc: 'System Sleep'},
  347. {id: 'WAKE', name: 'Sys Wake', desc: 'System Wake'},
  348. {id: 'MUTE', name: 'Mute', desc: 'Audio Mute'},
  349. {id: 'VOLU', name: 'Vol Up', desc: 'Audio Vol Up'},
  350. {id: 'VOLD', name: 'Vol Down', desc: 'Audio Vol Down'},
  351. {id: 'MNXT', name: 'Next Track', desc: 'Next Track'},
  352. {id: 'MPRV', name: 'Prev Track', desc: 'Previous Track'},
  353. {id: 'MSTP', name: 'Stop', desc: 'Media Stop'},
  354. {id: 'MPLY', name: 'Play Pause', desc: 'Play Pause'},
  355. {id: 'MSEL', name: 'Select', desc: 'Media Select'},
  356. {id: 'EJCT', name: 'Eject', desc: 'Media Eject'},
  357. {id: 'MAIL', name: 'Mail', desc: 'Mail'},
  358. {id: 'CALC', name: 'Calc', desc: 'Calculator'},
  359. {id: 'MYCM', name: 'My Computer', desc: 'My Computer'},
  360. {id: 'WSCH', name: 'Web Search', desc: 'WWW Search'},
  361. {id: 'WHOM', name: 'Web Home', desc: 'WWW Home'},
  362. {id: 'WBAK', name: 'Web Back', desc: 'WWW Back'},
  363. {id: 'WFWD', name: 'Web Forward', desc: 'WWW Forward'},
  364. {id: 'WSTP', name: 'Web Stop', desc: 'WWW Stop'},
  365. {id: 'WREF', name: 'Web Refresh', desc: 'WWW Refresh'},
  366. {id: 'WFAV', name: 'Web Favorites', desc: 'WWW Favorites'},
  367. {id: 'RESERVED-187', name: 'RESERVED-187', desc: 'RESERVED-187'},
  368. {id: 'RESERVED-188', name: 'RESERVED-188', desc: 'RESERVED-188'},
  369. {id: 'RESERVED-189', name: 'RESERVED-189', desc: 'RESERVED-189'},
  370. {id: 'RESERVED-190', name: 'RESERVED-190', desc: 'RESERVED-190'},
  371. {id: 'RESERVED-191', name: 'RESERVED-191', desc: 'RESERVED-191'},
  372. /* Fn key 192-223(0xc0-df) */
  373. {id: 'FN0 ', name: 'L1', desc: 'Change to Layer 1(Momentary) '},
  374. {id: 'FN1 ', name: 'L2', desc: 'Change to Layer 2(Momentary) '},
  375. {id: 'FN2 ', name: 'L3', desc: 'Change to Layer 3(Momentary) '},
  376. {id: 'FN3 ', name: 'L4', desc: 'Change to Layer 4(Momentary) '},
  377. {id: 'FN4 ', name: 'L5', desc: 'Change to Layer 5(Momentary) '},
  378. {id: 'FN5 ', name: 'L6', desc: 'Change to Layer 6(Momentary) '},
  379. {id: 'FN6 ', name: 'L7', desc: 'Change to Layer 7(Momentary) '},
  380. {id: 'FN7 ', name: 'T1', desc: 'Change to Layer 1(Toggle) '},
  381. {id: 'FN8 ', name: 'T2', desc: 'Change to Layer 2(Toggle) '},
  382. {id: 'FN9 ', name: 'T3', desc: 'Change to Layer 3(Toggle) '},
  383. {id: 'FN10', name: 'L1t', desc: 'Change to Layer 1(Momentary with Tap Toggle) '},
  384. {id: 'FN11', name: 'L2t', desc: 'Change to Layer 2(Momentary with Tap Toggle) '},
  385. {id: 'FN12', name: 'L3t', desc: 'Change to Layer 3(Momentary with Tap Toggle) '},
  386. /* Layer swith with Tap key */
  387. {id: 'FN13', name: 'A (L1)', desc: 'A with with L1(Tap key)'},
  388. {id: 'FN14', name: 'F (L2)', desc: 'F with with L2(Tap key)'},
  389. {id: 'FN15', name: 'J (L3)', desc: 'J with with L3(Tap key)'},
  390. {id: 'FN16', name: 'Space (L4)', desc: 'Space with L4(Tap key)'},
  391. {id: 'FN17', name: '; (L5)', desc: 'Semicolon with L5(Tap key)'},
  392. {id: 'FN18', name: '\'( L6)', desc: 'Quote with L6(Tap key)'},
  393. {id: 'FN19', name: '/ (L7)', desc: 'Slash with with L7(Tap key)'},
  394. /* Modifier on alpha key(Tap key, Dual-role key) */
  395. {id: 'FN20', name: 'Space (LShift)', desc: 'Space with Left Sfhit(Tap key)'},
  396. {id: 'FN21', name: 'Space (LCtrl)', desc: 'Space with Left Control(Tap key)'},
  397. {id: 'FN22', name: '\' (RCtrl)', desc: 'Quote with Right Control(Tap key)'},
  398. {id: 'FN23', name: 'Enter (RCtrl)', desc: 'Enter with Right Control(Tap key)'},
  399. /* Modifier with a key(Tap key, Dual-role key) */
  400. {id: 'FN24', name: 'LCtrl (Esc)', desc: 'Left Control with Escape'},
  401. {id: 'FN25', name: 'LCtrl (Backspace)', desc: 'Left Control with Backspace'},
  402. {id: 'FN26', name: 'LCtrl (OneShot)', desc: 'Left Control(OneShot Modifier)'},
  403. {id: 'FN27', name: 'LShift (Esc)', desc: 'Left Shift with Escape'},
  404. {id: 'FN28', name: 'LShift (Backspace)', desc: 'Left Shift with Backspace'},
  405. {id: 'FN29', name: 'LShift (OneShot)', desc: 'Left Shift(OneShot Modifier)'},
  406. {id: 'FN30', name: 'RShift (`)', desc: 'Right Shift with Grave(Tap key)'},
  407. {id: 'FN31', name: 'RShift (\\)', desc: 'Right Shift with Backslash(Tap key)'},
  408. /* Standeard codes for 16bit Action 165-223(0xa5-df)
  409. {id: 'RESERVED-165', name: 'RESERVED-165', desc: 'RESERVED-165'},
  410. {id: 'RESERVED-166', name: 'RESERVED-166', desc: 'RESERVED-166'},
  411. {id: 'RESERVED-167', name: 'RESERVED-167', desc: 'RESERVED-167'},
  412. {id: 'RESERVED-168', name: 'RESERVED-168', desc: 'RESERVED-168'},
  413. {id: 'RESERVED-169', name: 'RESERVED-169', desc: 'RESERVED-169'},
  414. {id: 'RESERVED-170', name: 'RESERVED-170', desc: 'RESERVED-170'},
  415. {id: 'RESERVED-171', name: 'RESERVED-171', desc: 'RESERVED-171'},
  416. {id: 'RESERVED-172', name: 'RESERVED-172', desc: 'RESERVED-172'},
  417. {id: 'RESERVED-173', name: 'RESERVED-173', desc: 'RESERVED-173'},
  418. {id: 'RESERVED-174', name: 'RESERVED-174', desc: 'RESERVED-174'},
  419. {id: 'RESERVED-175', name: 'RESERVED-175', desc: 'RESERVED-175'},
  420. {id: 'KP_00', name: 'KP_00', desc: 'KP_00'},
  421. {id: 'KP_000', name: 'KP_000', desc: 'KP_000'},
  422. {id: 'THOUSANDS_SEPARATOR', name: 'THOUSANDS_SEPARATOR', desc: 'THOUSANDS_SEPARATOR'},
  423. {id: 'DECIMAL_SEPARATOR', name: 'DECIMAL_SEPARATOR', desc: 'DECIMAL_SEPARATOR'},
  424. {id: 'CURRENCY_UNIT', name: 'CURRENCY_UNIT', desc: 'CURRENCY_UNIT'},
  425. {id: 'CURRENCY_SUB_UNIT', name: 'CURRENCY_SUB_UNIT', desc: 'CURRENCY_SUB_UNIT'},
  426. {id: 'KP_LPAREN', name: 'KP_LPAREN', desc: 'KP_LPAREN'},
  427. {id: 'KP_RPAREN', name: 'KP_RPAREN', desc: 'KP_RPAREN'},
  428. {id: 'KP_LCBRACKET', name: 'KP_LCBRACKET', desc: 'KP_LCBRACKET'},
  429. {id: 'KP_RCBRACKET', name: 'KP_RCBRACKET', desc: 'KP_RCBRACKET'},
  430. {id: 'KP_TAB', name: 'KP_TAB', desc: 'KP_TAB'},
  431. {id: 'KP_BSPACE', name: 'KP_BSPACE', desc: 'KP_BSPACE'},
  432. {id: 'KP_A', name: 'KP_A', desc: 'KP_A'},
  433. {id: 'KP_B', name: 'KP_B', desc: 'KP_B'},
  434. {id: 'KP_C', name: 'KP_C', desc: 'KP_C'},
  435. {id: 'KP_D', name: 'KP_D', desc: 'KP_D'},
  436. {id: 'KP_E', name: 'KP_E', desc: 'KP_E'},
  437. {id: 'KP_F', name: 'KP_F', desc: 'KP_F'},
  438. {id: 'KP_XOR', name: 'KP_XOR', desc: 'KP_XOR'},
  439. {id: 'KP_HAT', name: 'KP_HAT', desc: 'KP_HAT'},
  440. {id: 'KP_PERC', name: 'KP_PERC', desc: 'KP_PERC'},
  441. {id: 'KP_LT', name: 'KP_LT', desc: 'KP_LT'},
  442. {id: 'KP_GT', name: 'KP_GT', desc: 'KP_GT'},
  443. {id: 'KP_AND', name: 'KP_AND', desc: 'KP_AND'},
  444. {id: 'KP_LAZYAND', name: 'KP_LAZYAND', desc: 'KP_LAZYAND'},
  445. {id: 'KP_OR', name: 'KP_OR', desc: 'KP_OR'},
  446. {id: 'KP_LAZYOR', name: 'KP_LAZYOR', desc: 'KP_LAZYOR'},
  447. {id: 'KP_COLON', name: 'KP_COLON', desc: 'KP_COLON'},
  448. {id: 'KP_HASH', name: 'KP_HASH', desc: 'KP_HASH'},
  449. {id: 'KP_SPACE', name: 'KP_SPACE', desc: 'KP_SPACE'},
  450. {id: 'KP_ATMARK', name: 'KP_ATMARK', desc: 'KP_ATMARK'},
  451. {id: 'KP_EXCLAMATION', name: 'KP_EXCLAMATION', desc: 'KP_EXCLAMATION'},
  452. {id: 'KP_MEM_STORE', name: 'KP_MEM_STORE', desc: 'KP_MEM_STORE'},
  453. {id: 'KP_MEM_RECALL', name: 'KP_MEM_RECALL', desc: 'KP_MEM_RECALL'},
  454. {id: 'KP_MEM_CLEAR', name: 'KP_MEM_CLEAR', desc: 'KP_MEM_CLEAR'},
  455. {id: 'KP_MEM_ADD', name: 'KP_MEM_ADD', desc: 'KP_MEM_ADD'},
  456. {id: 'KP_MEM_SUB', name: 'KP_MEM_SUB', desc: 'KP_MEM_SUB'},
  457. {id: 'KP_MEM_MUL', name: 'KP_MEM_MUL', desc: 'KP_MEM_MUL'},
  458. {id: 'KP_MEM_DIV', name: 'KP_MEM_DIV', desc: 'KP_MEM_DIV'},
  459. {id: 'KP_PLUS_MINUS', name: 'KP_PLUS_MINUS', desc: 'KP_PLUS_MINUS'},
  460. {id: 'KP_CLEAR', name: 'KP_CLEAR', desc: 'KP_CLEAR'},
  461. {id: 'KP_CLEAR_ENTRY', name: 'KP_CLEAR_ENTRY', desc: 'KP_CLEAR_ENTRY'},
  462. {id: 'KP_BINARY', name: 'KP_BINARY', desc: 'KP_BINARY'},
  463. {id: 'KP_OCTAL', name: 'KP_OCTAL', desc: 'KP_OCTAL'},
  464. {id: 'KP_DECIMAL', name: 'KP_DECIMAL', desc: 'KP_DECIMAL'},
  465. {id: 'KP_HEXADECIMAL', name: 'KP_HEXADECIMAL', desc: 'KP_HEXADECIMAL'},
  466. {id: 'RESERVED-222', name: 'RESERVED-222', desc: 'RESERVED-222'},
  467. {id: 'RESERVED-223', name: 'RESERVED-223', desc: 'RESERVED-223'},
  468. */
  469. /* Modifier 224-231(0xe0-e7) */
  470. {id: 'LCTL', name: 'LCtrl', desc: 'Left Control'},
  471. {id: 'LSFT', name: 'LShift', desc: 'Left Shift'},
  472. {id: 'LALT', name: 'LAlt', desc: 'Left Alt(\u2325)'},
  473. {id: 'LGUI', name: 'LGui', desc: 'Left Windows(\u2318)'},
  474. {id: 'RCTL', name: 'RCtrl', desc: 'Right Control'},
  475. {id: 'RSFT', name: 'RShift', desc: 'Right Shift'},
  476. {id: 'RALT', name: 'RAlt', desc: 'Right Alt(\u2325)'},
  477. {id: 'RGUI', name: 'RGui', desc: 'Right Windows(\u2318)'},
  478. /* Not used 232-239(0xe8-ef) */
  479. {id: 'RESERVED-232', name: 'RESERVED-232', desc: 'RESERVED-232'},
  480. {id: 'RESERVED-233', name: 'RESERVED-233', desc: 'RESERVED-233'},
  481. {id: 'RESERVED-234', name: 'RESERVED-234', desc: 'RESERVED-234'},
  482. {id: 'RESERVED-235', name: 'RESERVED-235', desc: 'RESERVED-235'},
  483. {id: 'RESERVED-236', name: 'RESERVED-236', desc: 'RESERVED-236'},
  484. {id: 'RESERVED-237', name: 'RESERVED-237', desc: 'RESERVED-237'},
  485. {id: 'RESERVED-238', name: 'RESERVED-238', desc: 'RESERVED-238'},
  486. {id: 'RESERVED-239', name: 'RESERVED-239', desc: 'RESERVED-239'},
  487. /* Mousekey 240-255(0xf0-ff) */
  488. {id: 'MS_U', name: 'Mouse Up', desc: 'Mouse UP'},
  489. {id: 'MS_D', name: 'Mouse down', desc: 'Mouse Down'},
  490. {id: 'MS_L', name: 'Mouse left', desc: 'Mouse Left'},
  491. {id: 'MS_R', name: 'Mouse right', desc: 'Mouse Right'},
  492. {id: 'BTN1', name: 'Mouse Btn1', desc: 'Mouse Button1'},
  493. {id: 'BTN2', name: 'Mouse Btn2', desc: 'Mouse Button2'},
  494. {id: 'BTN3', name: 'Mouse Btn3', desc: 'Mouse Button3'},
  495. {id: 'BTN4', name: 'Mouse Btn4', desc: 'Mouse Button4'},
  496. {id: 'BTN5', name: 'Mouse Btn5', desc: 'Mouse Button5'},
  497. {id: 'WH_U', name: 'Wheel Up', desc: 'Wheel Up'},
  498. {id: 'WH_D', name: 'Wheel Down', desc: 'Wheel Down'},
  499. {id: 'WH_L', name: 'Wheel Left', desc: 'Wheel Left'},
  500. {id: 'WH_R', name: 'Wheel Right', desc: 'Wheel Right'},
  501. {id: 'ACL0', name: 'Mouse Slow', desc: 'Mouse Slow'},
  502. {id: 'ACL1', name: 'Mouse Medium', desc: 'Mouse Medium'},
  503. {id: 'ACL2', name: 'Mouse Fast', desc: 'Mouse Fast'},
  504. ];