1 /* Copyright (C) 2012 by Jacob Alexander
3 * Permission is hereby granted, free of charge, to any person obtaining a copy
4 * of this software and associated documentation files (the "Software"), to deal
5 * in the Software without restriction, including without limitation the rights
6 * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
7 * copies of the Software, and to permit persons to whom the Software is
8 * furnished to do so, subject to the following conditions:
10 * The above copyright notice and this permission notice shall be included in
11 * all copies or substantial portions of the Software.
13 * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
14 * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
15 * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
16 * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
17 * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
18 * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
25 // This file contains various key layouts for the IBM Convertible keyboard
28 // ----- Variables -----
30 static uint8_t ibmconv_ModifierMask [] = { 0x2C, 0x38, 0x3A, 0x3B, 0x3C, 0x3E };
32 // Default 1-indexed key mappings
33 static uint8_t ibmconv_DefaultMap[] = {
46 KEY_MINUS, // 0x0C (-)
47 KEY_EQUAL, // 0x0D (+)
48 KEY_BACKSLASH, // 0x0E
49 KEY_BACKSPACE, // 0x0F
61 KEY_LEFT_BRACE, // 0x1B
62 KEY_RIGHT_BRACE, // 0x1C
64 KEY_CAPS_LOCK, // 0x1E
74 KEY_SEMICOLON, // 0x28
78 KEY_LEFT_SHIFT, // 0x2C
88 KEY_PERIOD, // 0x36 (Decimal)
89 KEY_SLASH, // 0x37 (/)
90 KEY_RIGHT_SHIFT, // 0x38
91 KEY_PRINTSCREEN, // 0x39 (*)
92 KEY_LEFT_CTRL, // 0x3A
96 KEY_RIGHT_ALT, // 0x3E
97 KEY_LEFT, // 0x3F (Home)
98 KEY_UP, // 0x40 (PgUp)
99 KEY_DOWN, // 0x41 (PgDn)
100 KEY_RIGHT, // 0x42 (End)
112 KEY_NUM_LOCK, // 0x4E
113 KEY_SCROLL_LOCK, // 0x4F
118 static uint8_t ibmconv_ColemakMap[] = {
131 KEY_MINUS, // 0x0C (-)
132 KEY_EQUAL, // 0x0D (+)
133 KEY_BACKSLASH, // 0x0E
134 KEY_BACKSPACE, // 0x0F
145 KEY_SEMICOLON, // 0x1A
146 KEY_LEFT_BRACE, // 0x1B
147 KEY_RIGHT_BRACE, // 0x1C
149 KEY_CAPS_LOCK, // 0x1E
163 KEY_LEFT_SHIFT, // 0x2C
173 KEY_PERIOD, // 0x36 (Decimal)
174 KEY_SLASH, // 0x37 (/)
175 KEY_RIGHT_SHIFT, // 0x38
176 KEY_PRINTSCREEN, // 0x39 (*)
177 KEY_LEFT_CTRL, // 0x3A
178 KEY_LEFT_GUI, // 0x3B
179 KEY_LEFT_ALT, // 0x3C
181 KEY_RIGHT_ALT, // 0x3E
182 KEY_LEFT, // 0x3F (Home)
183 KEY_UP, // 0x40 (PgUp)
184 KEY_DOWN, // 0x41 (PgDn)
185 KEY_RIGHT, // 0x42 (End)
197 KEY_NUM_LOCK, // 0x4E
198 KEY_SCROLL_LOCK, // 0x4F