]> git.gir.st - tmk_keyboard.git/blob - converter/m0110_usb/unimap_trans.h
remove experimental return, cleanup slash_question key
[tmk_keyboard.git] / converter / m0110_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 /* M0110A scan codes
26 * ,---------------------------------------------------------. ,---------------.
27 * | 32| 12| 13| 14| 15| 17| 16| 1A| 1C| 19| 1D| 1B| 18| 33| | 47| 68| 6D| 62|
28 * |---------------------------------------------------------| |---------------|
29 * | 30| 0C| 0D| 0E| 0F| 11| 10| 20| 22| 1F| 23| 21| 1E| | | 59| 5B| 5C| 4E|
30 * |-----------------------------------------------------' | |---------------|
31 * | 39| 00| 01| 02| 03| 05| 04| 26| 28| 25| 29| 27| 24| | 56| 57| 58| 66|
32 * |---------------------------------------------------------| |---------------|
33 * | 38| 06| 07| 08| 09| 0B| 2D| 2E| 2B| 2F| 2C| 38| 4D| | 53| 54| 55| |
34 * `---------------------------------------------------------' |-----------| 4C|
35 * | 3A| 37| 31 | 2A| 46| 42| 48| | 52| 41| |
36 * `---------------------------------------------------------' `---------------'
37 *
38 * M0110 + M0120 scan codes
39 * ,---------------------------------------------------------. ,---------------.
40 * | 32| 12| 13| 14| 15| 17| 16| 1A| 1C| 19| 1D| 1B| 18| 33| | 47| 68| 6D| 62|
41 * |---------------------------------------------------------| |---------------|
42 * | 30| 0C| 0D| 0E| 0F| 11| 10| 20| 22| 1F| 23| 21| 1E| 2A| | 59| 5B| 5C| 4E|
43 * |---------------------------------------------------------| |---------------|
44 * | 39| 00| 01| 02| 03| 05| 04| 26| 28| 25| 29| 27| 24| | 56| 57| 58| 66|
45 * |---------------------------------------------------------| |---------------|
46 * | 38| 06| 07| 08| 09| 0B| 2D| 2E| 2B| 2F| 2C| 38| | 53| 54| 55| |
47 * `---------------------------------------------------------' |-----------| 4C|
48 * | 3A| 37| 31 | 34| 3A| | 52| 41| |
49 * `------------------------------------------------' `---------------'
50 *
51 * International M0110
52 * https://en.wikipedia.org/wiki/File:Apple_Macintosh_Plus_Keyboard.jpg
53 * Probably International keyboard layout of M0110A doesn't exist.
54 * ,---------------------------------------------------------.
55 * | 32| 12| 13| 14| 15| 17| 16| 1A| 1C| 19| 1D| 1B| 18| 33|
56 * |---------------------------------------------------------|
57 * | 30| 0C| 0D| 0E| 0F| 11| 10| 20| 22| 1F| 23| 21| 1E| 2A|
58 * |------------------------------------------------------, |
59 * | 39| 00| 01| 02| 03| 05| 04| 26| 28| 25| 29| 27| 24| |
60 * |---------------------------------------------------------|
61 * | 38| 06| 07| 08| 09| 0B| 2D| 2E| 2B| 2F| 2C| 0A| 38|
62 * `---------------------------------------------------------'
63 * | 3A| 37| 34 | 31| 3A|
64 * `------------------------------------------------'
65 */
66 const uint8_t PROGMEM unimap_trans[MATRIX_ROWS][MATRIX_COLS] = {
67 // Position(unimap) scan code(matrix)
68 // ---------------------------------------------
69 {
70 UNIMAP_A, // 0x00
71 UNIMAP_S, // 0x01
72 UNIMAP_D, // 0x02
73 UNIMAP_F, // 0x03
74 UNIMAP_H, // 0x04
75 UNIMAP_G, // 0x05
76 #ifdef M0110_INTL
77 UNIMAP_NONUS_BSLASH, // 0x06
78 UNIMAP_Z, // 0x07
79 },
80 {
81 UNIMAP_X, // 0x08
82 UNIMAP_C, // 0x09
83 UNIMAP_SLASH, // 0x0A
84 UNIMAP_V, // 0x0B
85 #else
86 UNIMAP_Z, // 0x06
87 UNIMAP_X, // 0x07
88 },
89 {
90 UNIMAP_C, // 0x08
91 UNIMAP_V, // 0x09
92 UNIMAP_NO, // 0x0A
93 UNIMAP_B, // 0x0B
94 #endif
95 UNIMAP_Q, // 0x0C
96 UNIMAP_W, // 0x0D
97 UNIMAP_E, // 0x0E
98 UNIMAP_R, // 0x0F
99 },
100 {
101 UNIMAP_Y, // 0x10
102 UNIMAP_T, // 0x11
103 UNIMAP_1, // 0x12
104 UNIMAP_2, // 0x13
105 UNIMAP_3, // 0x14
106 UNIMAP_4, // 0x15
107 UNIMAP_6, // 0x16
108 UNIMAP_5, // 0x17
109 },
110 {
111 UNIMAP_EQUAL, // 0x18
112 UNIMAP_9, // 0x19
113 UNIMAP_7, // 0x1A
114 UNIMAP_MINUS, // 0x1B
115 UNIMAP_8, // 0x1C
116 UNIMAP_0, // 0x1D
117 UNIMAP_RBRACKET, // 0x1E
118 UNIMAP_O, // 0x1F
119 },
120 {
121 UNIMAP_U, // 0x20
122 UNIMAP_LBRACKET, // 0x21
123 UNIMAP_I, // 0x22
124 UNIMAP_P, // 0x23
125 #ifdef M0110_INTL
126 UNIMAP_NONUS_HASH, // 0x24
127 #else
128 UNIMAP_ENTER, // 0x24
129 #endif
130 UNIMAP_L, // 0x25
131 UNIMAP_J, // 0x26
132 UNIMAP_QUOTE, // 0x27
133 },
134 {
135 UNIMAP_K, // 0x28
136 UNIMAP_SCOLON, // 0x29
137 #ifdef M0110_INTL
138 UNIMAP_ENTER, // 0x2A
139 UNIMAP_M, // 0x2B
140 UNIMAP_DOT, // 0x2C
141 UNIMAP_B, // 0x2D
142 UNIMAP_N, // 0x2E
143 UNIMAP_COMMA, // 0x2F
144 #else
145 UNIMAP_BSLASH, // 0x2A
146 UNIMAP_COMMA, // 0x2B
147 UNIMAP_SLASH, // 0x2C
148 UNIMAP_N, // 0x2D
149 UNIMAP_M, // 0x2E
150 UNIMAP_DOT, // 0x2F
151 #endif
152 },
153 {
154 UNIMAP_TAB, // 0x30
155 #ifdef M0110_INTL
156 UNIMAP_RGUI, // 0x31
157 #else
158 UNIMAP_SPACE, // 0x31
159 #endif
160 UNIMAP_GRAVE, // 0x32
161 UNIMAP_BSPACE, // 0x33
162 #ifdef M0110_INTL
163 UNIMAP_SPACE, // 0x34
164 #else
165 UNIMAP_RGUI, // 0x34
166 #endif
167 UNIMAP_NO, // 0x35
168 UNIMAP_NO, // 0x36
169 UNIMAP_LGUI, // 0x37
170 },
171 {
172 UNIMAP_LSHIFT, // 0x38
173 UNIMAP_CAPSLOCK, // 0x39
174 UNIMAP_LALT, // 0x3A
175 UNIMAP_NO, // 0x3B
176 UNIMAP_NO, // 0x3C
177 UNIMAP_NO, // 0x3D
178 UNIMAP_NO, // 0x3E
179 UNIMAP_NO, // 0x3F
180 },
181 {
182 UNIMAP_NO, // 0x40
183 UNIMAP_KP_DOT, // 0x41
184 UNIMAP_RIGHT, // 0x42
185 UNIMAP_NO, // 0x43
186 UNIMAP_NO, // 0x44
187 UNIMAP_NO, // 0x45
188 UNIMAP_LEFT, // 0x46
189 UNIMAP_NUMLOCK, // 0x47
190 },
191 {
192 UNIMAP_DOWN, // 0x48
193 UNIMAP_NO, // 0x49
194 UNIMAP_NO, // 0x4A
195 UNIMAP_NO, // 0x4B
196 UNIMAP_KP_ENTER, // 0x4C
197 UNIMAP_UP, // 0x4D
198 UNIMAP_KP_PLUS, // 0x4E keypad minus
199 UNIMAP_NO, // 0x4F
200 },
201 {
202 UNIMAP_NO, // 0x50
203 UNIMAP_NO, // 0x51
204 UNIMAP_KP_0, // 0x52
205 UNIMAP_KP_1, // 0x53
206 UNIMAP_KP_2, // 0x54
207 UNIMAP_KP_3, // 0x55
208 UNIMAP_KP_4, // 0x56
209 UNIMAP_KP_5, // 0x57
210 },
211 {
212 UNIMAP_KP_6, // 0x58
213 UNIMAP_KP_7, // 0x59
214 UNIMAP_NO, // 0x5A
215 UNIMAP_KP_8, // 0x5B
216 UNIMAP_KP_9, // 0x5C
217 UNIMAP_NO, // 0x5D
218 UNIMAP_NO, // 0x5E
219 UNIMAP_NO, // 0x5F
220 },
221 {
222 UNIMAP_NO, // 0x60
223 UNIMAP_NO, // 0x61
224 UNIMAP_KP_MINUS, // 0x62 keypad asterisk
225 UNIMAP_NO, // 0x63
226 UNIMAP_NO, // 0x64
227 UNIMAP_NO, // 0x65
228 UNIMAP_KP_COMMA, // 0x66
229 UNIMAP_NO, // 0x67
230 },
231 {
232 UNIMAP_KP_SLASH, // 0x68 keypad equal
233 UNIMAP_NO, // 0x69
234 UNIMAP_NO, // 0x6A
235 UNIMAP_NO, // 0x6B
236 UNIMAP_NO, // 0x6C
237 UNIMAP_KP_ASTERISK, // 0x6D keypad slash
238 UNIMAP_NO, // 0x6E compose
239 UNIMAP_NO, // 0x6F
240 },
241 };
242
243 #endif
244
Imprint / Impressum