1 /* Copyright (C) 2011 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 Sony NEWS Topre Keyboard
30 // ----- Variables -----
31 static uint8_t sonynews_ModifierMask[] = { 0x28, 0x36, 0x42, 0x43, 0x4A };
33 static uint8_t sonynews_DefaultMap[] = {
58 KEY_INTER3, // 0x18 - Yen
59 KEY_BACKSPACE, // 0x19
71 KEY_LEFT_BRACE, // 0x25
72 KEY_RIGHT_BRACE, // 0x26
84 KEY_SEMICOLON, // 0x32
86 KEY_BACKSLASH, // 0x34
88 KEY_LEFT_SHIFT, // 0x36
99 KEY_INTER1, // 0x41 - "Ru" and "-"
100 KEY_RIGHT_SHIFT, // 0x42
102 KEY_CAPS_LOCK, // 0x44
103 KEY_INTER5, // 0x45 - Muhenkan
105 KEY_INTER4, // 0x47 - Henkan
106 KEY_LANG2, // 0x48 - Eisu (English/Numbers) (I've seen references to this mapping)
107 KEY_INTER2, // 0x49 - Kana
108 KEY_EXEC, // 0x4A - Jikkou XXX Which means Execute, and since there is no Language key
112 KEYPAD_MINUS, // 0x4E
120 KEYPAD_COMMA, // 0x56
123 KEYPAD_PERIOD, // 0x59
124 KEYPAD_ENTER, // 0x5A
134 KEYPAD_ASTERIX, // 0x64
135 KEYPAD_SLASH, // 0x65
144 KEY_PAGE_DOWN, // 0x6E
164 static uint8_t sonynews_ColemakMap[] = {
189 KEY_INTER3, // 0x18 - Yen
190 KEY_BACKSPACE, // 0x19
201 KEY_SEMICOLON, // 0x24
202 KEY_LEFT_BRACE, // 0x25
203 KEY_RIGHT_BRACE, // 0x26
217 KEY_BACKSLASH, // 0x34
219 KEY_LEFT_SHIFT, // 0x36
230 KEY_INTER1, // 0x41 - "Ru" and "-"
231 KEY_RIGHT_SHIFT, // 0x42
233 KEY_CAPS_LOCK, // 0x44
234 KEY_INTER5, // 0x45 - Muhenkan
236 KEY_INTER4, // 0x47 - Henkan
237 KEY_LANG2, // 0x48 - Eisu (English/Numbers) (I've seen references to this mapping)
238 KEY_INTER2, // 0x49 - Kana
239 //KEY_EXEC, // 0x4A - Jikkou XXX Which means Execute, and since there is no Language key
240 KEY_GUI, // 0x4A - Using Jikkou as Windows Key
244 KEYPAD_MINUS, // 0x4E
252 KEYPAD_COMMA, // 0x56
255 KEYPAD_PERIOD, // 0x59
256 KEYPAD_ENTER, // 0x5A
266 KEYPAD_ASTERIX, // 0x64
267 KEYPAD_SLASH, // 0x65
276 KEY_PAGE_DOWN, // 0x6E