]>
git.gir.st - tmk_keyboard.git/blob - converter/adb_usb/unimap_common.h
2 Copyright 2016 Jun Wako <wakojun@gmail.com>
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.
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.
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/>.
17 #ifndef UNIMAP_COMMON_H
18 #define UNIMAP_COMMON_H
21 #include <avr/pgmspace.h>
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 * `-----------------------------------------------------------' `-----------' `---------------'
44 // http://lxr.free-electrons.com/source/drivers/macintosh/adbhid.c
45 // http://opensource.apple.com//source/IOHIDFamily/IOHIDFamily-701.20.10/IOHIDFamily/Cosmo_USB2ADB.c
46 // http://m0115.web.fc2.com/m0115.jpg
47 const uint8_t PROGMEM unimap_trans
[MATRIX_ROWS
][MATRIX_COLS
] = {
48 // Position(unimap) ADB scan code(matrix)
49 // ---------------------------------------------
63 UNIMAP_NONUS_BSLASH
, // 0x0A
87 UNIMAP_RBRACKET
, // 0x1E
92 UNIMAP_LBRACKET
, // 0x21
102 UNIMAP_SCOLON
, // 0x29
103 UNIMAP_BSLASH
, // 0x2A
104 UNIMAP_COMMA
, // 0x2B
105 UNIMAP_SLASH
, // 0x2C
112 UNIMAP_SPACE
, // 0x31
113 UNIMAP_GRAVE
, // 0x32
114 UNIMAP_BSPACE
, // 0x33
115 UNIMAP_KP_ENTER
, // 0x34
116 UNIMAP_ESCAPE
, // 0x35
117 UNIMAP_LCTRL
, // 0x36
121 UNIMAP_LSHIFT
, // 0x38
122 UNIMAP_CAPSLOCK
, // 0x39
125 UNIMAP_RIGHT
, // 0x3C
128 UNIMAP_F23
, // 0x3F FN?
132 UNIMAP_KP_DOT
, // 0x41
134 UNIMAP_KP_ASTERISK
, // 0x43
136 UNIMAP_KP_PLUS
, // 0x45
138 UNIMAP_NUMLOCK
, // 0x47
144 UNIMAP_KP_SLASH
, // 0x4B
145 UNIMAP_KP_ENTER
, // 0x4C
147 UNIMAP_KP_MINUS
, // 0x4E
152 UNIMAP_KP_EQUAL
, // 0x51
168 UNIMAP_KP_COMMA
, // 0x5F
182 UNIMAP_PSCREEN
, // 0x69
184 UNIMAP_SCROLLLOCK
, // 0x6B
187 UNIMAP_APPLICATION
, // 0x6E compose
192 UNIMAP_PAUSE
, // 0x71
193 UNIMAP_INSERT
, // 0x72
196 UNIMAP_DELETE
, // 0x75
202 UNIMAP_PGDOWN
, // 0x79
204 UNIMAP_RSHIFT
, // 0x7B
206 UNIMAP_RCTRL
, // 0x7D
208 UNIMAP_F24
, // 0x7F power key