]> git.friedersdorff.com Git - max/tmk_keyboard.git/blob - converter/next_usb/unimap_trans.h
lufa: Fix comment on INTERRUPT_CONTROL_ENDPOINT
[max/tmk_keyboard.git] / converter / next_usb / unimap_trans.h
1 /*
2 Copyright 2016 Jun Wako <wakojun@gmail.com>
3
4 This program is free software: you can redistribute it and/or modify
5 it under the terms of the GNU General Public License as published by
6 the Free Software Foundation, either version 2 of the License, or
7 (at your option) any later version.
8
9 This program is distributed in the hope that it will be useful,
10 but WITHOUT ANY WARRANTY; without even the implied warranty of
11 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
12 GNU General Public License for more details.
13
14 You should have received a copy of the GNU General Public License
15 along with this program.  If not, see <http://www.gnu.org/licenses/>.
16 */
17 #ifndef UNIMAP_COMMON_H
18 #define UNIMAP_COMMON_H
19
20 #include <stdint.h>
21 #include <avr/pgmspace.h>
22 #include "unimap.h"
23
24
25 /* Mapping to Universal keyboard layout
26  *
27  * Universal keyboard layout
28  *         ,-----------------------------------------------.
29  *         |F13|F14|F15|F16|F17|F18|F19|F20|F21|F22|F23|F24|
30  * ,---.   |-----------------------------------------------|     ,-----------.     ,-----------.
31  * |Esc|   |F1 |F2 |F3 |F4 |F5 |F6 |F7 |F8 |F9 |F10|F11|F12|     |PrS|ScL|Pau|     |VDn|VUp|Mut|
32  * `---'   `-----------------------------------------------'     `-----------'     `-----------'
33  * ,-----------------------------------------------------------. ,-----------. ,---------------.
34  * |  `|  1|  2|  3|  4|  5|  6|  7|  8|  9|  0|  -|  =|JPY|Bsp| |Ins|Hom|PgU| |NmL|  /|  *|  -|
35  * |-----------------------------------------------------------| |-----------| |---------------|
36  * |Tab  |  Q|  W|  E|  R|  T|  Y|  U|  I|  O|  P|  [|  ]|  \  | |Del|End|PgD| |  7|  8|  9|  +|
37  * |-----------------------------------------------------------| `-----------' |---------------|
38  * |CapsL |  A|  S|  D|  F|  G|  H|  J|  K|  L|  ;|  '|  #|Retn|               |  4|  5|  6|KP,|
39  * |-----------------------------------------------------------|     ,---.     |---------------|
40  * |Shft|  <|  Z|  X|  C|  V|  B|  N|  M|  ,|  .|  /| RO|Shift |     |Up |     |  1|  2|  3|Ent|
41  * |-----------------------------------------------------------| ,-----------. |---------------|
42  * |Ctl|Gui|Alt|MHEN|     Space      |HENK|KANA|Alt|Gui|App|Ctl| |Lef|Dow|Rig| |  0    |  .|KP=|
43  * `-----------------------------------------------------------' `-----------' `---------------'
44  *
45  * NeXT Matrix(Scan code)
46  * ,-----------------------------------------------------------. ,-----------. ,---------------.
47  * | 49| 4A| 4B| 4C| 4D| 50| 4F| 4E| 1E| 1F| 20| 1D| 1C|   1B  | | 1A| 58| 19| | 26| 27| 28| 25|
48  * |-----------------------------------------------------------| |-----------| |---------------|
49  * | 41  | 42| 43| 44| 45| 48| 47| 46| 06| 07| 08| 05| 04| 03  | | 02|   | 01| | 21| 22| 23| 24|
50  * |-----------------------------------------------------------| `---'   `---' |-----------|---|
51  * | 57   | 39| 3A| 3B| 3C| 3D| 40| 3F| 3E| 2D| 2C| 2B|   2A   |               | 12| 18| 13| 15|
52  * |-----------------------------------------------------------|     ,---.     |---------------|
53  * | 56     | 31| 32| 33| 34| 35| 37| 36| 2E| 2F| 30|  55      |     | 16|     | 11| 17| 14|   |
54  * |-----------------------------------------------------------| ,-----------. |-----------|   |
55  * | 52  | 54  |                38                 | 53  | 51  | | 09| 0F| 10| |0B     | 0C| 0D|
56  * `-----------------------------------------------------------' `-----------' `---------------'
57  * ,-----------------------------------------------------------. ,-----------. ,---------------.
58  * |  `|  1|  2|  3|  4|  5|  6|  7|  8|  9|  0|  -|  =| BSpc  | |Ins|Hom|PgU| |NmL|  /|  *|  -|
59  * |-----------------------------------------------------------| |-----------| |---------------|
60  * |Tab  |  Q|  W|  E|  R|  T|  Y|  U|  I|  O|  P|  [|  ]|  \  | |Del|   |PgD| |  7|  8|  9|  +|
61  * |-----------------------------------------------------------| `---'   `---' |---------------|
62  * |CapsL |  A|  S|  D|  F|  G|  H|  J|  K|  L|  ;|  '|  Return|               |  4|  5|  6|KP,|
63  * |-----------------------------------------------------------|     ,---.     |---------------|
64  * |Shft|  <|  Z|  X|  C|  V|  B|  N|  M|  ,|  .|  /|    Shift |     |Up |     |  1|  2|  3|   |
65  * |-----------------------------------------------------------| ,-----------. |-----------|   |
66  * |LCtl |Gui  |              Space                | App | RCtl| |Lef|Dow|Rig| |  0    |  .|Ent|
67  * `-----------------------------------------------------------' `-----------' `---------------'
68  */
69
70 // Matrix 12 * 8
71 const uint8_t PROGMEM unimap_trans[MATRIX_ROWS][MATRIX_COLS] = {
72     { UNIMAP_NO,   UNIMAP_PGDN, UNIMAP_DEL,  UNIMAP_BSLS, UNIMAP_RBRC, UNIMAP_LBRC, UNIMAP_I,    UNIMAP_O },    // 0x00-07
73     { UNIMAP_P,    UNIMAP_LEFT, UNIMAP_NO,   UNIMAP_P0,   UNIMAP_PDOT, UNIMAP_PENT, UNIMAP_NO,   UNIMAP_DOWN }, // 0x08-0F
74     { UNIMAP_RGHT, UNIMAP_P1,   UNIMAP_P4,   UNIMAP_P6,   UNIMAP_P3,   UNIMAP_PCMM, UNIMAP_UP,   UNIMAP_P2 },   // 0x10-17
75     { UNIMAP_P5,   UNIMAP_PGUP, UNIMAP_INS,  UNIMAP_BSPC, UNIMAP_EQL,  UNIMAP_MINS, UNIMAP_8,    UNIMAP_9 },    // 0x18-1f
76     { UNIMAP_0,    UNIMAP_P7,   UNIMAP_P8,   UNIMAP_P9,   UNIMAP_PPLS, UNIMAP_PMNS, UNIMAP_NLCK, UNIMAP_PSLS }, // 0x20-27
77     { UNIMAP_PAST, UNIMAP_NO,   UNIMAP_ENT,  UNIMAP_QUOT, UNIMAP_SCLN, UNIMAP_L,    UNIMAP_COMM, UNIMAP_DOT },  // 0x28-2f
78     { UNIMAP_SLSH, UNIMAP_Z,    UNIMAP_X,    UNIMAP_C,    UNIMAP_V,    UNIMAP_B,    UNIMAP_M,    UNIMAP_N },    // 0x30-37
79     { UNIMAP_SPC,  UNIMAP_A,    UNIMAP_S,    UNIMAP_D,    UNIMAP_F,    UNIMAP_G,    UNIMAP_K,    UNIMAP_J },    // 0x38-3f
80     { UNIMAP_H,    UNIMAP_TAB,  UNIMAP_Q,    UNIMAP_W,    UNIMAP_E,    UNIMAP_R,    UNIMAP_U,    UNIMAP_Y },    // 0x40-47
81     { UNIMAP_T,    UNIMAP_GRV,  UNIMAP_1,    UNIMAP_2,    UNIMAP_3,    UNIMAP_4,    UNIMAP_7,    UNIMAP_6 },    // 0x48-4f
82     { UNIMAP_5,    UNIMAP_RCTL, UNIMAP_LCTL, UNIMAP_APP,  UNIMAP_LGUI, UNIMAP_RSFT, UNIMAP_LSFT, UNIMAP_CAPS }, // 0x50-57
83     { UNIMAP_HOME, UNIMAP_NO,   UNIMAP_NO,   UNIMAP_NO,   UNIMAP_NO,   UNIMAP_NO,   UNIMAP_NO,   UNIMAP_NO }    // 0x58-5f
84 };
85
86 #endif