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 5.9KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586
  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_COMMON_H
  15. #define UNIMAP_COMMON_H
  16. #include <stdint.h>
  17. #include <avr/pgmspace.h>
  18. #include "unimap.h"
  19. /* Mapping to Universal keyboard layout
  20. *
  21. * Universal keyboard layout
  22. * ,-----------------------------------------------.
  23. * |F13|F14|F15|F16|F17|F18|F19|F20|F21|F22|F23|F24|
  24. * ,---. |-----------------------------------------------| ,-----------. ,-----------.
  25. * |Esc| |F1 |F2 |F3 |F4 |F5 |F6 |F7 |F8 |F9 |F10|F11|F12| |PrS|ScL|Pau| |VDn|VUp|Mut|
  26. * `---' `-----------------------------------------------' `-----------' `-----------'
  27. * ,-----------------------------------------------------------. ,-----------. ,---------------.
  28. * | `| 1| 2| 3| 4| 5| 6| 7| 8| 9| 0| -| =|JPY|Bsp| |Ins|Hom|PgU| |NmL| /| *| -|
  29. * |-----------------------------------------------------------| |-----------| |---------------|
  30. * |Tab | Q| W| E| R| T| Y| U| I| O| P| [| ]| \ | |Del|End|PgD| | 7| 8| 9| +|
  31. * |-----------------------------------------------------------| `-----------' |---------------|
  32. * |CapsL | A| S| D| F| G| H| J| K| L| ;| '| #|Retn| | 4| 5| 6|KP,|
  33. * |-----------------------------------------------------------| ,---. |---------------|
  34. * |Shft| <| Z| X| C| V| B| N| M| ,| .| /| RO|Shift | |Up | | 1| 2| 3|Ent|
  35. * |-----------------------------------------------------------| ,-----------. |---------------|
  36. * |Ctl|Gui|Alt|MHEN| Space |HENK|KANA|Alt|Gui|App|Ctl| |Lef|Dow|Rig| | 0 | .|KP=|
  37. * `-----------------------------------------------------------' `-----------' `---------------'
  38. *
  39. * NeXT Matrix(Scan code)
  40. * ,-----------------------------------------------------------. ,-----------. ,---------------.
  41. * | 49| 4A| 4B| 4C| 4D| 50| 4F| 4E| 1E| 1F| 20| 1D| 1C| 1B | | 1A| 58| 19| | 26| 27| 28| 25|
  42. * |-----------------------------------------------------------| |-----------| |---------------|
  43. * | 41 | 42| 43| 44| 45| 48| 47| 46| 06| 07| 08| 05| 04| 03 | | 02| | 01| | 21| 22| 23| 24|
  44. * |-----------------------------------------------------------| `---' `---' |-----------|---|
  45. * | 57 | 39| 3A| 3B| 3C| 3D| 40| 3F| 3E| 2D| 2C| 2B| 2A | | 12| 18| 13| 15|
  46. * |-----------------------------------------------------------| ,---. |---------------|
  47. * | 56 | 31| 32| 33| 34| 35| 37| 36| 2E| 2F| 30| 55 | | 16| | 11| 17| 14| |
  48. * |-----------------------------------------------------------| ,-----------. |-----------| |
  49. * | 52 | 54 | 38 | 53 | 51 | | 09| 0F| 10| |0B | 0C| 0D|
  50. * `-----------------------------------------------------------' `-----------' `---------------'
  51. * ,-----------------------------------------------------------. ,-----------. ,---------------.
  52. * | `| 1| 2| 3| 4| 5| 6| 7| 8| 9| 0| -| =| BSpc | |Ins|Hom|PgU| |NmL| /| *| -|
  53. * |-----------------------------------------------------------| |-----------| |---------------|
  54. * |Tab | Q| W| E| R| T| Y| U| I| O| P| [| ]| \ | |Del| |PgD| | 7| 8| 9| +|
  55. * |-----------------------------------------------------------| `---' `---' |---------------|
  56. * |CapsL | A| S| D| F| G| H| J| K| L| ;| '| Return| | 4| 5| 6|KP,|
  57. * |-----------------------------------------------------------| ,---. |---------------|
  58. * |Shft| <| Z| X| C| V| B| N| M| ,| .| /| Shift | |Up | | 1| 2| 3| |
  59. * |-----------------------------------------------------------| ,-----------. |-----------| |
  60. * |LCtl |Gui | Space | App | RCtl| |Lef|Dow|Rig| | 0 | .|Ent|
  61. * `-----------------------------------------------------------' `-----------' `---------------'
  62. */
  63. // Matrix 12 * 8
  64. const uint8_t PROGMEM unimap_trans[MATRIX_ROWS][MATRIX_COLS] = {
  65. { UNIMAP_NO, UNIMAP_PGDN, UNIMAP_DEL, UNIMAP_BSLS, UNIMAP_RBRC, UNIMAP_LBRC, UNIMAP_I, UNIMAP_O }, // 0x00-07
  66. { UNIMAP_P, UNIMAP_LEFT, UNIMAP_NO, UNIMAP_P0, UNIMAP_PDOT, UNIMAP_PENT, UNIMAP_NO, UNIMAP_DOWN }, // 0x08-0F
  67. { UNIMAP_RGHT, UNIMAP_P1, UNIMAP_P4, UNIMAP_P6, UNIMAP_P3, UNIMAP_PCMM, UNIMAP_UP, UNIMAP_P2 }, // 0x10-17
  68. { UNIMAP_P5, UNIMAP_PGUP, UNIMAP_INS, UNIMAP_BSPC, UNIMAP_EQL, UNIMAP_MINS, UNIMAP_8, UNIMAP_9 }, // 0x18-1f
  69. { UNIMAP_0, UNIMAP_P7, UNIMAP_P8, UNIMAP_P9, UNIMAP_PPLS, UNIMAP_PMNS, UNIMAP_NLCK, UNIMAP_PSLS }, // 0x20-27
  70. { UNIMAP_PAST, UNIMAP_NO, UNIMAP_ENT, UNIMAP_QUOT, UNIMAP_SCLN, UNIMAP_L, UNIMAP_COMM, UNIMAP_DOT }, // 0x28-2f
  71. { UNIMAP_SLSH, UNIMAP_Z, UNIMAP_X, UNIMAP_C, UNIMAP_V, UNIMAP_B, UNIMAP_M, UNIMAP_N }, // 0x30-37
  72. { UNIMAP_SPC, UNIMAP_A, UNIMAP_S, UNIMAP_D, UNIMAP_F, UNIMAP_G, UNIMAP_K, UNIMAP_J }, // 0x38-3f
  73. { UNIMAP_H, UNIMAP_TAB, UNIMAP_Q, UNIMAP_W, UNIMAP_E, UNIMAP_R, UNIMAP_U, UNIMAP_Y }, // 0x40-47
  74. { UNIMAP_T, UNIMAP_GRV, UNIMAP_1, UNIMAP_2, UNIMAP_3, UNIMAP_4, UNIMAP_7, UNIMAP_6 }, // 0x48-4f
  75. { UNIMAP_5, UNIMAP_RCTL, UNIMAP_LCTL, UNIMAP_APP, UNIMAP_LGUI, UNIMAP_RSFT, UNIMAP_LSFT, UNIMAP_CAPS }, // 0x50-57
  76. { UNIMAP_HOME, UNIMAP_NO, UNIMAP_NO, UNIMAP_NO, UNIMAP_NO, UNIMAP_NO, UNIMAP_NO, UNIMAP_NO } // 0x58-5f
  77. };
  78. #endif