Keyboard firmwares for Atmel AVR and Cortex-M
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

unimap_trans.h 9.5KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113
  1. /*
  2. Copyright 2016 Jun Wako <[email protected]>
  3. This program is free software: you can redistribute it and/or modify
  4. it under the terms of the GNU General Public License as published by
  5. the Free Software Foundation, either version 2 of the License, or
  6. (at your option) any later version.
  7. This program is distributed in the hope that it will be useful,
  8. but WITHOUT ANY WARRANTY; without even the implied warranty of
  9. MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  10. GNU General Public License for more details.
  11. You should have received a copy of the GNU General Public License
  12. along with this program. If not, see <http://www.gnu.org/licenses/>.
  13. */
  14. #ifndef UNIMAP_TRNAS_H
  15. #define UNIMAP_TRNAS_H
  16. #include <stdint.h>
  17. #include <avr/pgmspace.h>
  18. #include "unimap.h"
  19. const uint8_t PROGMEM unimap_trans[MATRIX_ROWS][MATRIX_COLS] = { // 16*8
  20. #ifndef IBM4704_ALPS
  21. /* IBM4740 Capcitive models(62-key/77-key/107-key)
  22. * ,-------. ,-----------------------------------------------------------. ,-----------. ,---------------.
  23. * | F1| F2| | `| 1| 2| 3| 4| 5| 6| 7| 8| 9| 0| -| =|JPY|BSp| |Ins|Hom|PgU| |NmL| /| *| -|
  24. * |-------| |-----------------------------------------------------------| |-----------| |---------------|
  25. * | F3| F4| |Tab | Q| W| E| R| T| Y| U| I| O| P| [| ]| \| |Del|End|PgD| | 7| 8| 9| +|
  26. * |-------| |-----------------------------------------------------------| |-----------| |---------------|
  27. * | F5| F6| |Caps | A| S| D| F| G| H| J| K| L| ;| '| #|Retn| |PrS|ScL|Pau| | 4| 5| 6|KP,|
  28. * |-------| |-----------------------------------------------------------| |-----------| |---------------|
  29. * | F7| F8| |Shif| <| Z| X| C| V| B| N| M| ,| .| /| RO|Shift | |F11| Up|F12| | 1| 2| 3|Ent|
  30. * |-------| |-----------------------------------------------------------| |-----------| |---------------|
  31. * | F9|F10| |Ctrl |Gui|Alt | Space |Alt* |Gui|Ctrl | |Lef|Dow|Rig| |Esc| 0|KP.|KP=|
  32. * `-------' `-----------------------------------------------------------' `-----------' `---------------'
  33. * scan codes
  34. * ,-------. ,-----------------------------------------------------------. ,-----------. ,---------------.
  35. * | 46| 64| | 00| 18| 19| 1A| 10| 11| 12| 08| 09| 0A| 0F| 1F| 0D| 0C| 0E| | 6A| 6B| 6C| | 47| 48| 49| 4A|
  36. * |-------| |-----------------------------------------------------------| |-----------| |---------------|
  37. * | 56| 66| | 04 | 05| 06| 13| 14| 15| 16| 17| 01| 02| 03| 1B| 1C| 1D| | 6D| 6E| 6F| | 4B| 4C| 4D| 4E|
  38. * |-------| |-----------------------------------------------------------| |-----------| |---------------|
  39. * | 71| 77| | 20 | 21| 22| 23| 24| 25| 26| 27| 28| 29| 2A| 2B| 2C| 2D| | 70| 65| 72| | 50| 51| 52| 53|
  40. * |-------| |-----------------------------------------------------------| |-----------| |---------------|
  41. * | 44| 45| | 30 | 3E| 32| 33| 34| 35| 36| 37| 38| 39| 3A| 3B| 3C| 3D| | 74| 75| 76| | 5E| 58| 59| 5A|
  42. * |-------| |-----------------------------------------------------------| |-----------| |---------------|
  43. * | 54| 55| | 31 | 41| 3F | 40 | *3F | 42| 2F | | 78| 67| 79| | 5B| 5C| 5D| 57|
  44. * `-------' `-----------------------------------------------------------' `-----------' `---------------'
  45. * Both Alt keys spit same scan code 3F.
  46. */
  47. { UNIMAP_GRV, UNIMAP_I, UNIMAP_O, UNIMAP_P, UNIMAP_TAB, UNIMAP_Q, UNIMAP_W, UNIMAP_NO }, // 00-07
  48. { UNIMAP_7, UNIMAP_8, UNIMAP_9, UNIMAP_NO, UNIMAP_JYEN, UNIMAP_EQL, UNIMAP_BSPC, UNIMAP_0 }, // 08-0F
  49. { UNIMAP_4, UNIMAP_5, UNIMAP_6, UNIMAP_E, UNIMAP_R, UNIMAP_T, UNIMAP_Y, UNIMAP_U }, // 10-17
  50. { UNIMAP_1, UNIMAP_2, UNIMAP_3, UNIMAP_LBRC, UNIMAP_RBRC, UNIMAP_BSLS, UNIMAP_NO, UNIMAP_MINS }, // 18-1F
  51. { UNIMAP_CAPS, UNIMAP_A, UNIMAP_S, UNIMAP_D, UNIMAP_F, UNIMAP_G, UNIMAP_H, UNIMAP_J }, // 20-27
  52. { UNIMAP_K, UNIMAP_L, UNIMAP_SCLN, UNIMAP_QUOT, UNIMAP_NUHS, UNIMAP_ENT, UNIMAP_NO, UNIMAP_RCTL }, // 28-2F
  53. { UNIMAP_LSFT, UNIMAP_LCTL, UNIMAP_Z, UNIMAP_X, UNIMAP_C, UNIMAP_V, UNIMAP_B, UNIMAP_N, }, // 30-37
  54. { UNIMAP_M, UNIMAP_COMM, UNIMAP_DOT, UNIMAP_SLSH, UNIMAP_RO, UNIMAP_RSFT, UNIMAP_NUBS, UNIMAP_LALT }, // 38-3F
  55. { UNIMAP_SPC, UNIMAP_LGUI, UNIMAP_RGUI, UNIMAP_NO, UNIMAP_F7, UNIMAP_F8, UNIMAP_F1, UNIMAP_NLCK }, // 40-47
  56. { UNIMAP_PSLS, UNIMAP_PAST, UNIMAP_PMNS, UNIMAP_P7, UNIMAP_P8, UNIMAP_P9, UNIMAP_PPLS, UNIMAP_NO }, // 48-4F
  57. { UNIMAP_P4, UNIMAP_P5, UNIMAP_P6, UNIMAP_PCMM, UNIMAP_F9, UNIMAP_F10, UNIMAP_F3, UNIMAP_PEQL }, // 50-57
  58. { UNIMAP_P2, UNIMAP_P3, UNIMAP_PENT, UNIMAP_ESC, UNIMAP_P0, UNIMAP_PDOT, UNIMAP_P1, UNIMAP_NO }, // 58-5F
  59. { UNIMAP_NO, UNIMAP_NO, UNIMAP_NO, UNIMAP_NO, UNIMAP_F2, UNIMAP_SLCK, UNIMAP_F4, UNIMAP_DOWN }, // 60-67
  60. { UNIMAP_NO, UNIMAP_NO, UNIMAP_INS, UNIMAP_HOME, UNIMAP_PGUP, UNIMAP_DEL, UNIMAP_END, UNIMAP_PGDN }, // 68-6F
  61. { UNIMAP_PSCR, UNIMAP_F5, UNIMAP_PAUS, UNIMAP_NO, UNIMAP_F11, UNIMAP_UP, UNIMAP_F12, UNIMAP_F6 }, // 70-77
  62. { UNIMAP_LEFT, UNIMAP_RGHT, UNIMAP_NO, UNIMAP_NO, UNIMAP_NO, UNIMAP_NO, UNIMAP_NO, UNIMAP_NO } // 78-7F
  63. #else
  64. /* IBM4740 Alps models(102-key)
  65. * ,---------------------------------------------------------------. ,-----------. ,---------------.
  66. * | `| 1| 2| 3| 4| 5| 6| 7| 8| 9| 0| -| =|JPY|BSp| F1| |Ins|Hom|PgU| |NmL| /| *| -|
  67. * |---------------------------------------------------------------| |-----------| |---------------|
  68. * |Tab | Q| W| E| R| T| Y| U| I| O| P| [| ]| \| F2| |Del|End|PgD| | 7| 8| 9| +|
  69. * |---------------------------------------------------------------| |-----------| |---------------|
  70. * |Caps | A| S| D| F| G| H| J| K| L| ;| '| #|Retn| F3| |PrS|ScL|Pau| | 4| 5| 6|KP,|
  71. * |---------------------------------------------------------------| |-----------| |---------------|
  72. * |Shift | Z| X| C| V| B| N| M| ,| .| /| RO|Shift | F4| |F11| Up|F12| | 1| 2| 3|Ent|
  73. * |---------------------------------------------------------------| |-----------| |---------------|
  74. * |Ctrl |Gui|Alt | Space |Alt |Gui| Ctrl | |Lef|Dow|Rig| |Esc| 0|KP.|KP=|
  75. * `---------------------------------------------------------------' `-----------' `---------------'
  76. * ,---------------------------------------------------------------. ,-----------. ,---------------.
  77. * | 00| 0F| 01| 02| 03| 04| 05| 06| 07| 08| 09| 0A| 0B| 0C| 0D| 0E| | 44| 45| 46| | 43| 41| 42| 4A|
  78. * |---------------------------------------------------------------| |-----------| |---------------|
  79. * | 10 | 11| 12| 13| 14| 15| 16| 17| 18| 19| 1A| 1B| 1C| 1D | 1E| | 54| 55| 56| | 50| 51| 52| 5A|
  80. * |---------------------------------------------------------------| |-----------| |---------------|
  81. * | 20 | 21| 22| 23| 24| 25| 26| 27| 28| 29| 2A| 2B| 2C| 2D | 2E| | 64| 65| 66| | 60| 61| 62| 6B|
  82. * |---------------------------------------------------------------| |-----------| |---------------|
  83. * | 30 | 32| 33| 34| 35| 36| 37| 38| 39| 3A| 3B| 3C| 3D | 3E| | 74| 75| 76| | 70| 71| 72| 7B|
  84. * |---------------------------------------------------------------| |-----------| |---------------|
  85. * | 31 | 47| 3F | 40 | 4F | 48| 2F | | 77| 67| 57| | 73| 63| 53| 4E|
  86. * `---------------------------------------------------------------' `-----------' `---------------'
  87. */
  88. { UNIMAP_GRV, UNIMAP_2, UNIMAP_3, UNIMAP_4, UNIMAP_5, UNIMAP_6, UNIMAP_7, UNIMAP_8 }, // 00-07
  89. { UNIMAP_9, UNIMAP_0, UNIMAP_MINS, UNIMAP_EQL, UNIMAP_JYEN, UNIMAP_BSPC, UNIMAP_F1, UNIMAP_1 }, // 08-0F
  90. { UNIMAP_TAB, UNIMAP_Q, UNIMAP_W, UNIMAP_E, UNIMAP_R, UNIMAP_T, UNIMAP_Y, UNIMAP_U }, // 10-17
  91. { UNIMAP_I, UNIMAP_O, UNIMAP_P, UNIMAP_LBRC, UNIMAP_RBRC, UNIMAP_BSLS, UNIMAP_F2, UNIMAP_NO }, // 18-1F
  92. { UNIMAP_CAPS, UNIMAP_A, UNIMAP_S, UNIMAP_D, UNIMAP_F, UNIMAP_G, UNIMAP_H, UNIMAP_J }, // 20-27
  93. { UNIMAP_K, UNIMAP_L, UNIMAP_SCLN, UNIMAP_QUOT, UNIMAP_NUHS, UNIMAP_ENT, UNIMAP_F3, UNIMAP_RCTL }, // 28-2F
  94. { UNIMAP_LSFT, UNIMAP_LCTL, UNIMAP_Z, UNIMAP_X, UNIMAP_C, UNIMAP_V, UNIMAP_B, UNIMAP_N }, // 30-37
  95. { UNIMAP_M, UNIMAP_COMM, UNIMAP_DOT, UNIMAP_SLSH, UNIMAP_RO, UNIMAP_RSFT, UNIMAP_F4, UNIMAP_LALT }, // 38-3F
  96. { UNIMAP_SPC, UNIMAP_PSLS, UNIMAP_PAST, UNIMAP_NLCK, UNIMAP_INS, UNIMAP_HOME, UNIMAP_PGUP, UNIMAP_LGUI }, // 40-47
  97. { UNIMAP_RGUI, UNIMAP_NO, UNIMAP_PMNS, UNIMAP_NO, UNIMAP_NO, UNIMAP_NO, UNIMAP_PEQL, UNIMAP_RALT }, // 48-4F
  98. { UNIMAP_P7, UNIMAP_P8, UNIMAP_P9, UNIMAP_PDOT, UNIMAP_DEL, UNIMAP_END, UNIMAP_PGDN, UNIMAP_RGHT }, // 50-57
  99. { UNIMAP_NO, UNIMAP_NO, UNIMAP_PPLS, UNIMAP_NO, UNIMAP_NO, UNIMAP_NO, UNIMAP_NO, UNIMAP_NO, }, // 58-5F
  100. { UNIMAP_P4, UNIMAP_P5, UNIMAP_P6, UNIMAP_P0, UNIMAP_PSCR, UNIMAP_SLCK, UNIMAP_PAUS, UNIMAP_DOWN }, // 60-67
  101. { UNIMAP_NO, UNIMAP_NO, UNIMAP_NO, UNIMAP_PCMM, UNIMAP_NO, UNIMAP_NO, UNIMAP_NO, UNIMAP_NO, }, // 68-6F
  102. { UNIMAP_P1, UNIMAP_P2, UNIMAP_P3, UNIMAP_ESC, UNIMAP_F11, UNIMAP_UP, UNIMAP_F12, UNIMAP_LEFT }, // 70-77
  103. { UNIMAP_NO, UNIMAP_NO, UNIMAP_NO, UNIMAP_PENT, UNIMAP_NO, UNIMAP_NO, UNIMAP_NO, UNIMAP_NO, } // 78-7F
  104. #endif
  105. };
  106. #endif