diff options
Diffstat (limited to 'keyboards/converter/m0110_usb/m0110_usb.h')
-rw-r--r-- | keyboards/converter/m0110_usb/m0110_usb.h | 131 |
1 files changed, 131 insertions, 0 deletions
diff --git a/keyboards/converter/m0110_usb/m0110_usb.h b/keyboards/converter/m0110_usb/m0110_usb.h new file mode 100644 index 000000000..944296afd --- /dev/null +++ b/keyboards/converter/m0110_usb/m0110_usb.h | |||
@@ -0,0 +1,131 @@ | |||
1 | /* | ||
2 | Copyright 2011,2012,2014,2015 Jun Wako <[email protected]> | ||
3 | This program is free software: you can redistribute it and/or modify | ||
4 | it under the terms of the GNU General Public License as published by | ||
5 | the Free Software Foundation, either version 2 of the License, or | ||
6 | (at your option) any later version. | ||
7 | This program is distributed in the hope that it will be useful, | ||
8 | but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
9 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
10 | GNU General Public License for more details. | ||
11 | You should have received a copy of the GNU General Public License | ||
12 | along with this program. If not, see <http://www.gnu.org/licenses/>. | ||
13 | |||
14 | -------------- | ||
15 | |||
16 | Ported to QMK by Techsock <[email protected]> | ||
17 | */ | ||
18 | |||
19 | #pragma once | ||
20 | |||
21 | #include "quantum.h" | ||
22 | |||
23 | #define XXX KC_NO | ||
24 | |||
25 | /* Common layout for M0110 and M0110A | ||
26 | * This keymap works with both keyboards. As you can see, the M0110A is | ||
27 | * a superset of M0110 keyboard, only one exception is 'Enter'(34) of M0110 | ||
28 | * does not exist on the M0110A. | ||
29 | * | ||
30 | * ,---------------------------------------------------------. ,---------------. | ||
31 | * | `| 1| 2| 3| 4| 5| 6| 7| 8| 9| 0| -| =|Backs| |Clr| =| /| *| | ||
32 | * |---------------------------------------------------------| |---------------| | ||
33 | * |Tab | Q| W| E| R| T| Y| U| I| O| P| [| ]| | | 7| 8| 9| -| | ||
34 | * |-----------------------------------------------------' | |---------------| | ||
35 | * |Caps | A| S| D| F| G| H| J| K| L| ;| '|Return| | 4| 5| 6| +| | ||
36 | * |---------------------------------------------------------| |---------------| | ||
37 | * |Shift | Z| X| C| V| B| N| M| ,| ,| /|Shft|Up | | 1| 2| 3| | | ||
38 | * |---------------------------------------------------------| |-----------|Ent| | ||
39 | * |Opt |Mac | Space |Ent| \|Lft|Rgt|Dn | | 0| .| | | ||
40 | * `---------------------------------------------------------' `---------------' | ||
41 | * | ||
42 | * M0110A scan codes | ||
43 | * ,---------------------------------------------------------. ,---------------. | ||
44 | * | 32| 12| 13| 14| 15| 17| 16| 1A| 1C| 19| 1D| 1B| 18| 33| | 47| 68| 6D| 62| | ||
45 | * |---------------------------------------------------------| |---------------| | ||
46 | * | 30| 0C| 0D| 0E| 0F| 11| 10| 20| 22| 1F| 23| 21| 1E| | | 59| 5B| 5C| 4E| | ||
47 | * |-----------------------------------------------------' | |---------------| | ||
48 | * | 39| 00| 01| 02| 03| 05| 04| 26| 28| 25| 29| 27| 24| | 56| 57| 58| 66| | ||
49 | * |---------------------------------------------------------| |---------------| | ||
50 | * | 38| 06| 07| 08| 09| 0B| 2D| 2E| 2B| 2F| 2C| 38| 4D| | 53| 54| 55| | | ||
51 | * `---------------------------------------------------------' |-----------| 4C| | ||
52 | * | 3A| 37| 31 | 2A| 46| 42| 48| | 52| 41| | | ||
53 | * `---------------------------------------------------------' `---------------' | ||
54 | * | ||
55 | * M0110 + M0120 scan codes | ||
56 | * ,---------------------------------------------------------. ,---------------. | ||
57 | * | 32| 12| 13| 14| 15| 17| 16| 1A| 1C| 19| 1D| 1B| 18| 33| | 47| 68| 6D| 62| | ||
58 | * |---------------------------------------------------------| |---------------| | ||
59 | * | 30| 0C| 0D| 0E| 0F| 11| 10| 20| 22| 1F| 23| 21| 1E| 2A| | 59| 5B| 5C| 4E| | ||
60 | * |---------------------------------------------------------| |---------------| | ||
61 | * | 39| 00| 01| 02| 03| 05| 04| 26| 28| 25| 29| 27| 24| | 56| 57| 58| 66| | ||
62 | * |---------------------------------------------------------| |---------------| | ||
63 | * | 38| 06| 07| 08| 09| 0B| 2D| 2E| 2B| 2F| 2C| 38| | 53| 54| 55| | | ||
64 | * `---------------------------------------------------------' |-----------| 4C| | ||
65 | * | 3A| 37| 31 | 34| 3A| | 52| 41| | | ||
66 | * `------------------------------------------------' `---------------' | ||
67 | * Two right and left keys of 38 and 3A are identical, you cannot discriminate those two. | ||
68 | */ | ||
69 | #define LAYOUT_ansi( \ | ||
70 | K32, K12, K13, K14, K15, K17, K16, K1A, K1C, K19, K1D, K1B, K18, K33, K47, K68, K6D, K62, \ | ||
71 | K30, K0C, K0D, K0E, K0F, K11, K10, K20, K22, K1F, K23, K21, K1E, K59, K5B, K5C, K4E, \ | ||
72 | K39, K00, K01, K02, K03, K05, K04, K26, K28, K25, K29, K27, K24, K56, K57, K58, K66, \ | ||
73 | K38, K06, K07, K08, K09, K0B, K2D, K2E, K2B, K2F, K2C, K4D, K53, K54, K55, K4C, \ | ||
74 | K3A, K37, K31, K34, K2A, K46, K42, K48, K52, K41 \ | ||
75 | ) { \ | ||
76 | { K00, K01, K02, K03, K04, K05, K06, K07 }, \ | ||
77 | { K08, K09, XXX, K0B, K0C, K0D, K0E, K0F }, \ | ||
78 | { K10, K11, K12, K13, K14, K15, K16, K17 }, \ | ||
79 | { K18, K19, K1A, K1B, K1C, K1D, K1E, K1F }, \ | ||
80 | { K20, K21, K22, K23, K24, K25, K26, K27 }, \ | ||
81 | { K28, K29, K2A, K2B, K2C, K2D, K2E, K2F }, \ | ||
82 | { K30, K31, K32, K33, K34, XXX, XXX, K37 }, \ | ||
83 | { K38, K39, K3A, XXX, XXX, XXX, XXX, XXX }, \ | ||
84 | { XXX, K41, K42, XXX, XXX, XXX, K46, K47 }, \ | ||
85 | { K48, XXX, XXX, XXX, K4C, K4D, K4E, XXX }, \ | ||
86 | { XXX, XXX, K52, K53, K54, K55, K56, K57 }, \ | ||
87 | { K58, K59, XXX, K5B, K5C, XXX, XXX, XXX }, \ | ||
88 | { XXX, XXX, K62, XXX, XXX, XXX, K66, XXX }, \ | ||
89 | { K68, XXX, XXX, XXX, XXX, K6D, XXX, XXX } \ | ||
90 | } | ||
91 | |||
92 | /* International keyboard layout for M0110 + M0120 | ||
93 | * https://en.wikipedia.org/wiki/File:Apple_Macintosh_Plus_Keyboard.jpg | ||
94 | * Probably International keyboard layout of M0110A doesn't exist. | ||
95 | * | ||
96 | * M0110 + M0120 scan codes | ||
97 | * ,---------------------------------------------------------. ,---------------. | ||
98 | * | 32| 12| 13| 14| 15| 17| 16| 1A| 1C| 19| 1D| 1B| 18| 33| | 47| 68| 6D| 62| | ||
99 | * |---------------------------------------------------------| |---------------| | ||
100 | * | 30| 0C| 0D| 0E| 0F| 11| 10| 20| 22| 1F| 23| 21| 1E| 2A| | 59| 5B| 5C| 4E| | ||
101 | * |------------------------------------------------------, | |---------------| | ||
102 | * | 39| 00| 01| 02| 03| 05| 04| 26| 28| 25| 29| 27| 24| | | 56| 57| 58| 66| | ||
103 | * |---------------------------------------------------------| |---------------| | ||
104 | * | 38| 06| 07| 08| 09| 0B| 2D| 2E| 2B| 2F| 2C| 0A| 38| | 53| 54| 55| | | ||
105 | * `---------------------------------------------------------' |-----------| 4C| | ||
106 | * | 3A| 37| 34 | 31| 3A| | 52| 41| | | ||
107 | * `------------------------------------------------' `---------------' | ||
108 | * Two right and left keys of 38 and 3A are identical, you cannot discriminate those two. | ||
109 | */ | ||
110 | #define LAYOUT_iso( \ | ||
111 | K32, K12, K13, K14, K15, K17, K16, K1A, K1C, K19, K1D, K1B, K18, K33, K47, K68, K6D, K62, \ | ||
112 | K30, K0C, K0D, K0E, K0F, K11, K10, K20, K22, K1F, K23, K21, K1E, K2A, K59, K5B, K5C, K4E, \ | ||
113 | K39, K00, K01, K02, K03, K05, K04, K26, K28, K25, K29, K27, K24, K56, K57, K58, K66, \ | ||
114 | K38, K06, K07, K08, K09, K0B, K2D, K2E, K2B, K2F, K2C, K0A, K53, K54, K55, K4C, \ | ||
115 | K3A, K37, K34, K31, K52, K41 \ | ||
116 | ) { \ | ||
117 | { K00, K01, K02, K03, K04, K05, K06, K07 }, \ | ||
118 | { K08, K09, K0A, K0B, K0C, K0D, K0E, K0F }, \ | ||
119 | { K10, K11, K12, K13, K14, K15, K16, K17 }, \ | ||
120 | { K18, K19, K1A, K1B, K1C, K1D, K1E, K1F }, \ | ||
121 | { K20, K21, K22, K23, K24, K25, K26, K27 }, \ | ||
122 | { K28, K29, K2A, K2B, K2C, K2D, K2E, K2F }, \ | ||
123 | { K30, K31, K32, K33, K34, XXX, XXX, K37 }, \ | ||
124 | { K38, K39, K3A, XXX, XXX, XXX, XXX, XXX }, \ | ||
125 | { XXX, K41, XXX, XXX, XXX, XXX, XXX, K47 }, \ | ||
126 | { XXX, XXX, XXX, XXX, K4C, XXX, K4E, XXX }, \ | ||
127 | { XXX, XXX, K52, K53, K54, K55, K56, K57 }, \ | ||
128 | { K58, K59, XXX, K5B, K5C, XXX, XXX, XXX }, \ | ||
129 | { XXX, XXX, K62, XXX, XXX, XXX, K66, XXX }, \ | ||
130 | { K68, XXX, XXX, XXX, XXX, K6D, XXX, XXX } \ | ||
131 | } | ||