]> git.gir.st - tmk_keyboard.git/blob - converter/adb_usb/unimap_common.h
news_usb: Change keymap and add README
[tmk_keyboard.git] / converter / adb_usb / unimap_common.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 /* Apple Extended Keyboard Common layout: ANSI+ISO
26 * ,---. .---------------. ,---------------. ,---------------. ,-----------. ,---------------.
27 * |Esc| |F1 |F2 |F3 |F4 | |F5 |F6 |F7 |F8 | |F9 |F10|F11|F12| |PrS|ScL|Pau| |VDn|VUp|Mut|F24|
28 * `---' `---------------' `---------------' `---------------' `-----------' `---------------'
29 * ,-----------------------------------------------------------. ,-----------. ,---------------.
30 * | `| 1| 2| 3| 4| 5| 6| 7| 8| 9| 0| -| =|Backspa| |Ins|Hom|PgU| |NmL| =| /| *|
31 * |-----------------------------------------------------------| |-----------| |---------------|
32 * |Tab | Q| W| E| R| T| Y| U| I| O| P| [| ]| \| |Del|End|PgD| | 7| 8| 9| -|
33 * |-----------------------------------------------------------| `-----------' |---------------|
34 * |CapsLo| A| S| D| F| G| H| J| K| L| ;| '|Return | | 4| 5| 6| +|
35 * |-----------------------------------------------------------| ,---. |---------------|
36 * |Shif|\ | Z| X| C| V| B| N| M| ,| ,| /|Shift | |Up | | 1| 2| 3| |
37 * |-----------------------------------------------------------| ,-----------. |-----------|Ent|
38 * |Ctrl |Alt |Gui | Space |Gui |Alt |Ctrl | |Lef|Dow|Rig| | 0| .| |
39 * `-----------------------------------------------------------' `-----------' `---------------'
40 * Command = Gui
41 * Option = Alt
42 * Power key = F24
43 * Mic = F13(Adjustable keyboard)
44 */
45 // http://lxr.free-electrons.com/source/drivers/macintosh/adbhid.c
46 // http://opensource.apple.com//source/IOHIDFamily/IOHIDFamily-701.20.10/IOHIDFamily/Cosmo_USB2ADB.c
47 // http://m0115.web.fc2.com/m0115.jpg
48 const uint8_t PROGMEM unimap_trans[MATRIX_ROWS][MATRIX_COLS] = {
49 // Position(unimap) ADB scan code(matrix)
50 // ---------------------------------------------
51 {
52 UNIMAP_A, // 0x00
53 UNIMAP_S, // 0x01
54 UNIMAP_D, // 0x02
55 UNIMAP_F, // 0x03
56 UNIMAP_H, // 0x04
57 UNIMAP_G, // 0x05
58 UNIMAP_Z, // 0x06
59 UNIMAP_X, // 0x07
60 },
61 {
62 UNIMAP_C, // 0x08
63 UNIMAP_V, // 0x09
64 UNIMAP_NONUS_BSLASH, // 0x0A
65 UNIMAP_B, // 0x0B
66 UNIMAP_Q, // 0x0C
67 UNIMAP_W, // 0x0D
68 UNIMAP_E, // 0x0E
69 UNIMAP_R, // 0x0F
70 },
71 {
72 UNIMAP_Y, // 0x10
73 UNIMAP_T, // 0x11
74 UNIMAP_1, // 0x12
75 UNIMAP_2, // 0x13
76 UNIMAP_3, // 0x14
77 UNIMAP_4, // 0x15
78 UNIMAP_6, // 0x16
79 UNIMAP_5, // 0x17
80 },
81 {
82 UNIMAP_EQUAL, // 0x18
83 UNIMAP_9, // 0x19
84 UNIMAP_7, // 0x1A
85 UNIMAP_MINUS, // 0x1B
86 UNIMAP_8, // 0x1C
87 UNIMAP_0, // 0x1D
88 UNIMAP_RBRACKET, // 0x1E
89 UNIMAP_O, // 0x1F
90 },
91 {
92 UNIMAP_U, // 0x20
93 UNIMAP_LBRACKET, // 0x21
94 UNIMAP_I, // 0x22
95 UNIMAP_P, // 0x23
96 UNIMAP_ENTER, // 0x24
97 UNIMAP_L, // 0x25
98 UNIMAP_J, // 0x26
99 UNIMAP_QUOTE, // 0x27
100 },
101 {
102 UNIMAP_K, // 0x28
103 UNIMAP_SCOLON, // 0x29
104 UNIMAP_BSLASH, // 0x2A
105 UNIMAP_COMMA, // 0x2B
106 UNIMAP_SLASH, // 0x2C
107 UNIMAP_N, // 0x2D
108 UNIMAP_M, // 0x2E
109 UNIMAP_DOT, // 0x2F
110 },
111 {
112 UNIMAP_TAB, // 0x30
113 UNIMAP_SPACE, // 0x31
114 UNIMAP_GRAVE, // 0x32
115 UNIMAP_BSPACE, // 0x33
116 UNIMAP_KP_ENTER, // 0x34
117 UNIMAP_ESCAPE, // 0x35
118 UNIMAP_LCTRL, // 0x36
119 UNIMAP_LGUI, // 0x37
120 },
121 {
122 UNIMAP_LSHIFT, // 0x38
123 UNIMAP_CAPSLOCK, // 0x39
124 UNIMAP_LALT, // 0x3A
125 UNIMAP_LEFT, // 0x3B
126 UNIMAP_RIGHT, // 0x3C
127 UNIMAP_DOWN, // 0x3D
128 UNIMAP_UP, // 0x3E
129 UNIMAP_F23, // 0x3F FN?
130 },
131 {
132 UNIMAP_F17, // 0x40
133 UNIMAP_KP_DOT, // 0x41
134 UNIMAP_F13, // 0x42 Mic(Adjustable keyboard)
135 UNIMAP_KP_MINUS, // 0x43 ADB keypad asterisk(top right)
136 UNIMAP_NO, // 0x44
137 UNIMAP_KP_COMMA, // 0x45 ADB keypad plus
138 UNIMAP_NO, // 0x46
139 UNIMAP_NUMLOCK, // 0x47
140 },
141 {
142 UNIMAP_VOLUME_UP, // 0x48 Vol Up(Adjustable keyboard)
143 UNIMAP_VOLUME_DOWN, // 0x49 Vol Down(Adjustable keyboard)
144 UNIMAP_VOLUME_MUTE, // 0x4A Vol Mute(Adjustable keyboard)
145 UNIMAP_KP_ASTERISK, // 0x4B ADB keypad slash(between equal and asterisk)
146 UNIMAP_KP_ENTER, // 0x4C
147 UNIMAP_NO, // 0x4D
148 UNIMAP_KP_PLUS, // 0x4E ADB keypad minus
149 UNIMAP_F18, // 0x4F
150 },
151 {
152 UNIMAP_F19, // 0x50
153 UNIMAP_KP_SLASH, // 0x51 ADB keypad equal(next to clear/numlock)
154 UNIMAP_KP_0, // 0x52
155 UNIMAP_KP_1, // 0x53
156 UNIMAP_KP_2, // 0x54
157 UNIMAP_KP_3, // 0x55
158 UNIMAP_KP_4, // 0x56
159 UNIMAP_KP_5, // 0x57
160 },
161 {
162 UNIMAP_KP_6, // 0x58
163 UNIMAP_KP_7, // 0x59
164 UNIMAP_F20, // 0x5A
165 UNIMAP_KP_8, // 0x5B
166 UNIMAP_KP_9, // 0x5C
167 UNIMAP_JYEN, // 0x5D
168 UNIMAP_RO, // 0x5E
169 UNIMAP_KP_COMMA, // 0x5F
170 },
171 {
172 UNIMAP_F5, // 0x60
173 UNIMAP_F6, // 0x61
174 UNIMAP_F7, // 0x62
175 UNIMAP_F3, // 0x63
176 UNIMAP_F8, // 0x64
177 UNIMAP_F9, // 0x65
178 UNIMAP_MHEN, // 0x66
179 UNIMAP_F11, // 0x67
180 },
181 {
182 UNIMAP_HENK, // 0x68
183 UNIMAP_PSCREEN, // 0x69
184 UNIMAP_F16, // 0x6A
185 UNIMAP_SCROLLLOCK, // 0x6B
186 UNIMAP_NO, // 0x6C
187 UNIMAP_F10, // 0x6D
188 UNIMAP_APPLICATION, // 0x6E compose
189 UNIMAP_F12, // 0x6F
190 },
191 {
192 UNIMAP_NO, // 0x70
193 UNIMAP_PAUSE, // 0x71
194 UNIMAP_INSERT, // 0x72
195 UNIMAP_HOME, // 0x73
196 UNIMAP_PGUP, // 0x74
197 UNIMAP_DELETE, // 0x75
198 UNIMAP_F4, // 0x76
199 UNIMAP_END, // 0x77
200 },
201 {
202 UNIMAP_F2, // 0x78
203 UNIMAP_PGDOWN, // 0x79
204 UNIMAP_F1, // 0x7A
205 UNIMAP_RSHIFT, // 0x7B
206 UNIMAP_RALT, // 0x7C
207 UNIMAP_RCTRL, // 0x7D
208 UNIMAP_RGUI, // 0x7E
209 UNIMAP_F24, // 0x7F power key
210 }
211 };
212
213 #endif
Imprint / Impressum