]> git.friedersdorff.com Git - max/tmk_keyboard.git/blob - converter/usb_usb/unimap_trans.h
usb_usb: Add unimap
[max/tmk_keyboard.git] / converter / usb_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|KP=|
41  * |-----------------------------------------------------------| ,-----------. |---------------|
42  * |Ctl|Gui|Alt|MHEN|     Space      |HENK|KANA|Alt|Gui|App|Ctl| |Lef|Dow|Rig| |  0    |  .|Ent|
43  * `-----------------------------------------------------------' `-----------' `---------------'
44  */
45
46 /* USB 16x16
47 *         ,---------------. ,---------------. ,---------------.
48 *         |F13|F14|F15|F16| |F17|F18|F19|F20| |F21|F22|F23|F24|
49 * ,---.   |---------------| |---------------| |---------------| ,-----------. ,---------------. ,-------.
50 * |Esc|   |F1 |F2 |F3 |F4 | |F5 |F6 |F7 |F8 | |F9 |F10|F11|F12| |PrS|ScL|Pau| |VDn|VUp|Mut|Pwr| | Help  |
51 * `---'   `---------------' `---------------' `---------------' `-----------' `---------------' `-------'
52 * ,-----------------------------------------------------------. ,-----------. ,---------------. ,-------.
53 * |  `|  1|  2|  3|  4|  5|  6|  7|  8|  9|  0|  -|  =|JPY|Bsp| |Ins|Hom|PgU| |NmL|  /|  *|  -| |Stp|Agn|
54 * |-----------------------------------------------------------| |-----------| |---------------| |-------|
55 * |Tab  |  Q|  W|  E|  R|  T|  Y|  U|  I|  O|  P|  [|  ]|  \  | |Del|End|PgD| |  7|  8|  9|  +| |Mnu|Und|
56 * |-----------------------------------------------------------| `-----------' |---------------| |-------|
57 * |CapsL |  A|  S|  D|  F|  G|  H|  J|  K|  L|  ;|  :|  #|Retn|               |  4|  5|  6|KP,| |Sel|Cpy|
58 * |-----------------------------------------------------------|     ,---.     |---------------| |-------|
59 * |Shft|  <|  Z|  X|  C|  V|  B|  N|  M|  ,|  ,|  /| RO|Shift |     |Up |     |  1|  2|  3|KP=| |Exe|Pst|
60 * |-----------------------------------------------------------| ,-----------. |---------------| |-------|
61 * |Ctl|Gui|Alt|MHEN|HNJ| Space  |H/E|HENK|KANA|Alt|Gui|App|Ctl| |Lef|Dow|Rig| |  0    |  .|Ent| |Fnd|Cut|
62 * `-----------------------------------------------------------' `-----------' `---------------' `-------'
63 */
64 const uint8_t PROGMEM unimap_trans[MATRIX_ROWS][MATRIX_COLS] = {
65     { UNIMAP_KANA,  UNIMAP_VOLUME_DOWN, UNIMAP_VOLUME_UP, UNIMAP_VOLUME_MUTE, UNIMAP_A, UNIMAP_B, UNIMAP_C, UNIMAP_D,
66       UNIMAP_E,     UNIMAP_F,     UNIMAP_G,     UNIMAP_H,     UNIMAP_I,     UNIMAP_J,     UNIMAP_K,     UNIMAP_L },
67     { UNIMAP_M,     UNIMAP_N,     UNIMAP_O,     UNIMAP_P,     UNIMAP_Q,     UNIMAP_R,     UNIMAP_S,     UNIMAP_T,
68       UNIMAP_U,     UNIMAP_V,     UNIMAP_W,     UNIMAP_X,     UNIMAP_Y,     UNIMAP_Z,     UNIMAP_1,     UNIMAP_2 },
69     { UNIMAP_3,     UNIMAP_4,     UNIMAP_5,     UNIMAP_6,     UNIMAP_7,     UNIMAP_8,     UNIMAP_9,     UNIMAP_0,
70       UNIMAP_ENTER, UNIMAP_ESCAPE,UNIMAP_BSPACE,UNIMAP_TAB,   UNIMAP_SPACE, UNIMAP_MINUS, UNIMAP_EQUAL, UNIMAP_LBRACKET },
71     { UNIMAP_RBRACKET,UNIMAP_BSLASH,UNIMAP_NONUS_HASH, UNIMAP_SCOLON, UNIMAP_QUOTE, UNIMAP_GRAVE, UNIMAP_COMMA, UNIMAP_DOT,
72       UNIMAP_SLASH, UNIMAP_CAPSLOCK,UNIMAP_F1,  UNIMAP_F2,    UNIMAP_F3,    UNIMAP_F4,    UNIMAP_F5,    UNIMAP_F6 },
73     { UNIMAP_F7,    UNIMAP_F8,    UNIMAP_F9,    UNIMAP_F10,   UNIMAP_F11,   UNIMAP_F12,   UNIMAP_PSCREEN,UNIMAP_SCROLLLOCK,
74       UNIMAP_PAUSE, UNIMAP_INSERT,UNIMAP_HOME,  UNIMAP_PGUP,  UNIMAP_DELETE,UNIMAP_END,   UNIMAP_PGDOWN, UNIMAP_RIGHT },
75     { UNIMAP_LEFT,  UNIMAP_DOWN,  UNIMAP_UP, UNIMAP_NUMLOCK, UNIMAP_KP_SLASH, UNIMAP_KP_ASTERISK, UNIMAP_KP_MINUS, UNIMAP_KP_PLUS,
76       UNIMAP_KP_ENTER,UNIMAP_KP_1,UNIMAP_KP_2,  UNIMAP_KP_3,  UNIMAP_KP_4,  UNIMAP_KP_5,  UNIMAP_KP_6,  UNIMAP_KP_7 },
77     { UNIMAP_KP_8,  UNIMAP_KP_9,  UNIMAP_KP_0,  UNIMAP_KP_DOT,UNIMAP_NONUS_BSLASH,UNIMAP_APPLICATION,UNIMAP_KP_COMMA,UNIMAP_KP_EQUAL,
78       UNIMAP_F13,   UNIMAP_F14,   UNIMAP_F15,   UNIMAP_F16,   UNIMAP_F17,   UNIMAP_F18,   UNIMAP_F19,   UNIMAP_F20 },
79     { UNIMAP_F21,   UNIMAP_F22,   UNIMAP_F23,   UNIMAP_F24,   UNIMAP_NO,    UNIMAP_NO,    UNIMAP_NO,    UNIMAP_NO,
80       UNIMAP_NO,    UNIMAP_NO,    UNIMAP_NO,    UNIMAP_NO,    UNIMAP_NO,    UNIMAP_NO,    UNIMAP_NO,    UNIMAP_NO    }, /* 78-7F */ \
81     { UNIMAP_NO,    UNIMAP_NO,    UNIMAP_NO,    UNIMAP_NO,    UNIMAP_NO,    UNIMAP_NO,    UNIMAP_NO,    UNIMAP_RO,      /* 80-87 */ \
82       UNIMAP_NO,    UNIMAP_JYEN,  UNIMAP_HENK,  UNIMAP_MHEN,  UNIMAP_NO,    UNIMAP_NO,    UNIMAP_NO,    UNIMAP_NO    }, /* 88-8F */ \
83     { UNIMAP_NO,    UNIMAP_NO,    UNIMAP_NO,    UNIMAP_NO,    UNIMAP_NO,    UNIMAP_NO,    UNIMAP_NO,    UNIMAP_NO,      /* 90-97 */ \
84       UNIMAP_NO,    UNIMAP_NO,    UNIMAP_NO,    UNIMAP_NO,    UNIMAP_NO,    UNIMAP_NO,    UNIMAP_NO,    UNIMAP_NO    }, /* 98-9F */ \
85     { UNIMAP_NO,    UNIMAP_NO,    UNIMAP_NO,    UNIMAP_NO,    UNIMAP_NO,    UNIMAP_NO,    UNIMAP_NO,    UNIMAP_NO,      /* A0-A7 */ \
86       UNIMAP_NO,    UNIMAP_NO,    UNIMAP_NO,    UNIMAP_NO,    UNIMAP_NO,    UNIMAP_NO,    UNIMAP_NO,    UNIMAP_NO    }, /* A8-AF */ \
87     { UNIMAP_NO,    UNIMAP_NO,    UNIMAP_NO,    UNIMAP_NO,    UNIMAP_NO,    UNIMAP_NO,    UNIMAP_NO,    UNIMAP_NO,      /* B0-B7 */ \
88       UNIMAP_NO,    UNIMAP_NO,    UNIMAP_NO,    UNIMAP_NO,    UNIMAP_NO,    UNIMAP_NO,    UNIMAP_NO,    UNIMAP_NO    }, /* B8-BF */ \
89     { UNIMAP_NO,    UNIMAP_NO,    UNIMAP_NO,    UNIMAP_NO,    UNIMAP_NO,    UNIMAP_NO,    UNIMAP_NO,    UNIMAP_NO,      /* C0-C7 */ \
90       UNIMAP_NO,    UNIMAP_NO,    UNIMAP_NO,    UNIMAP_NO,    UNIMAP_NO,    UNIMAP_NO,    UNIMAP_NO,    UNIMAP_NO    }, /* C8-CF */ \
91     { UNIMAP_NO,    UNIMAP_NO,    UNIMAP_NO,    UNIMAP_NO,    UNIMAP_NO,    UNIMAP_NO,    UNIMAP_NO,    UNIMAP_NO,      /* D0-D7 */ \
92       UNIMAP_NO,    UNIMAP_NO,    UNIMAP_NO,    UNIMAP_NO,    UNIMAP_NO,    UNIMAP_NO,    UNIMAP_NO,    UNIMAP_NO    }, /* D8-DF */ \
93     { UNIMAP_LCTRL, UNIMAP_LSHIFT,UNIMAP_LALT,  UNIMAP_LGUI,  UNIMAP_RCTRL, UNIMAP_RSHIFT,UNIMAP_RALT,  UNIMAP_RGUI,     /* E0-E7 */ \
94       UNIMAP_NO,    UNIMAP_NO,    UNIMAP_NO,    UNIMAP_NO,    UNIMAP_NO,    UNIMAP_NO,    UNIMAP_NO,    UNIMAP_NO    }, /* E8-EF */ \
95     { UNIMAP_NO,    UNIMAP_NO,    UNIMAP_NO,    UNIMAP_NO,    UNIMAP_NO,    UNIMAP_NO,    UNIMAP_NO,    UNIMAP_NO,      /* F0-F7 */ \
96       UNIMAP_NO,    UNIMAP_NO,    UNIMAP_NO,    UNIMAP_NO,    UNIMAP_NO,    UNIMAP_NO,    UNIMAP_NO,    UNIMAP_NO    }, /* F8-FF */ \
97 };
98
99 #endif