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>
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 * `---------------------------------------------------------' `---------------'
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 * `------------------------------------------------' `---------------'
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 * `------------------------------------------------'
66 const uint8_t PROGMEM unimap_trans[MATRIX_ROWS][MATRIX_COLS] = {
67 // Position(unimap) scan code(matrix)
68 // ---------------------------------------------
77 UNIMAP_NONUS_BSLASH, // 0x06
111 UNIMAP_EQUAL, // 0x18
114 UNIMAP_MINUS, // 0x1B
117 UNIMAP_RBRACKET, // 0x1E
122 UNIMAP_LBRACKET, // 0x21
126 UNIMAP_NONUS_HASH, // 0x24
128 UNIMAP_ENTER, // 0x24
132 UNIMAP_QUOTE, // 0x27
136 UNIMAP_SCOLON, // 0x29
138 UNIMAP_ENTER, // 0x2A
143 UNIMAP_COMMA, // 0x2F
145 UNIMAP_BSLASH, // 0x2A
146 UNIMAP_COMMA, // 0x2B
147 UNIMAP_SLASH, // 0x2C
158 UNIMAP_SPACE, // 0x31
160 UNIMAP_GRAVE, // 0x32
161 UNIMAP_BSPACE, // 0x33
163 UNIMAP_SPACE, // 0x34
172 UNIMAP_LSHIFT, // 0x38
173 UNIMAP_CAPSLOCK, // 0x39
183 UNIMAP_KP_DOT, // 0x41
184 UNIMAP_RIGHT, // 0x42
189 UNIMAP_NUMLOCK, // 0x47
196 UNIMAP_KP_ENTER, // 0x4C
198 UNIMAP_KP_PLUS, // 0x4E keypad minus
224 UNIMAP_KP_MINUS, // 0x62 keypad asterisk
228 UNIMAP_KP_COMMA, // 0x66
232 UNIMAP_KP_SLASH, // 0x68 keypad equal
237 UNIMAP_KP_ASTERISK, // 0x6D keypad slash
238 UNIMAP_NO, // 0x6E compose