aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--converter/ps2_usb/Makefile.pjrc75
-rw-r--r--converter/ps2_usb/keymap.c379
-rw-r--r--converter/ps2_usb/keymap_common.c30
-rw-r--r--converter/ps2_usb/keymap_common.h174
-rw-r--r--converter/ps2_usb/keymap_plain.c50
5 files changed, 329 insertions, 379 deletions
diff --git a/converter/ps2_usb/Makefile.pjrc b/converter/ps2_usb/Makefile.pjrc
new file mode 100644
index 000000000..0e175f8b4
--- /dev/null
+++ b/converter/ps2_usb/Makefile.pjrc
@@ -0,0 +1,75 @@
1# Target file name (without extension).
2TARGET = ps2_usb_pjrc
3
4# Directory common source filess exist
5TOP_DIR = ../..
6
7# Directory keyboard dependent files exist
8TARGET_DIR = .
9
10# keyboard dependent files
11SRC = keymap_common.c \
12 matrix.c \
13 led.c
14
15ifdef KEYMAP
16 SRC := keymap_$(KEYMAP).c $(SRC)
17else
18 SRC := keymap_plain.c $(SRC)
19endif
20
21CONFIG_H = config.h
22
23
24# MCU name, you MUST set this to match the board you are using
25# type "make clean" after changing this, so all files will be rebuilt
26#MCU = at90usb162 # Teensy 1.0
27MCU = atmega32u4 # Teensy 2.0
28#MCU = at90usb646 # Teensy++ 1.0
29#MCU = at90usb1286 # Teensy++ 2.0
30
31
32# Processor frequency.
33# Normally the first thing your program should do is set the clock prescaler,
34# so your program will run at the correct speed. You should also set this
35# variable to same clock speed. The _delay_ms() macro uses this, and many
36# examples use this variable to calculate timings. Do not add a "UL" here.
37F_CPU = 16000000
38
39
40# Boot Section Size in *bytes*
41# Teensy halfKay 512
42# Teensy++ halfKay 1024
43# Atmel DFU loader 4096
44# LUFA bootloader 4096
45# USBaspLoader 2048
46OPT_DEFS += -DBOOTLOADER_SIZE=4096
47
48
49# Build Options
50# *Comment out* to disable the options.
51#
52#BOOTMAGIC_ENABLE = yes # Virtual DIP switch configuration(+1000)
53MOUSEKEY_ENABLE = yes # Mouse keys
54EXTRAKEY_ENABLE = yes # Audio control and System control
55CONSOLE_ENABLE = yes # Console for debug(+400)
56COMMAND_ENABLE = yes # Commands for debug and configuration
57NKRO_ENABLE = yes # USB Nkey Rollover
58
59
60# PS/2 Options
61#
62#PS2_USE_USART = yes # uses hardware USART engine for PS/2 signal receive(recomened)
63#PS2_USE_INT = yes # uses external interrupt for falling edge of PS/2 clock pin
64PS2_USE_BUSYWAIT = yes # uses primitive reference code
65
66
67# Search Path
68VPATH += $(TARGET_DIR)
69VPATH += $(TOP_DIR)
70
71
72include $(TOP_DIR)/protocol.mk
73include $(TOP_DIR)/protocol/pjrc.mk
74include $(TOP_DIR)/common.mk
75include $(TOP_DIR)/rules.mk
diff --git a/converter/ps2_usb/keymap.c b/converter/ps2_usb/keymap.c
deleted file mode 100644
index c97783fa5..000000000
--- a/converter/ps2_usb/keymap.c
+++ /dev/null
@@ -1,379 +0,0 @@
1/*
2Copyright 2011 Jun Wako <wakojun@gmail.com>
3
4This program is free software: you can redistribute it and/or modify
5it under the terms of the GNU General Public License as published by
6the Free Software Foundation, either version 2 of the License, or
7(at your option) any later version.
8
9This program is distributed in the hope that it will be useful,
10but WITHOUT ANY WARRANTY; without even the implied warranty of
11MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12GNU General Public License for more details.
13
14You should have received a copy of the GNU General Public License
15along with this program. If not, see <http://www.gnu.org/licenses/>.
16*/
17
18/*
19 * Keymap for PS/2 keyboard
20 */
21#include <stdint.h>
22#include <stdbool.h>
23#include <avr/pgmspace.h>
24#include "keycode.h"
25#include "print.h"
26#include "debug.h"
27#include "util.h"
28#include "keymap.h"
29
30
31
32
33// Following macros help you to define a keymap with the form of actual keyboard layout.
34
35/* US layout plus all other various keys */
36#define KEYMAP_ALL( \
37 K76,K05,K06,K04,K0C,K03,K0B,K83,K0A,K01,K09,K78,K07, KFC,K7E,KFE, \
38 K0E,K16,K1E,K26,K25,K2E,K36,K3D,K3E,K46,K45,K4E,K55,K66, KF0,KEC,KFD, K77,KCA,K7C,K7B, \
39 K0D,K15,K1D,K24,K2D,K2C,K35,K3C,K43,K44,K4D,K54,K5B,K5D, KF1,KE9,KFA, K6C,K75,K7D, \
40 K58,K1C,K1B,K23,K2B,K34,K33,K3B,K42,K4B,K4C,K52, K5A, K6B,K73,K74,K79, \
41 K12,K1A,K22,K21,K2A,K32,K31,K3A,K41,K49,K4A, K59, KF5, K69,K72,K7A, \
42 K14,K9F,K11, K29, K91,KA7,KAF,K94, KEB,KF2,KF4, K70, K71,KDA, \
43 \
44 K61, /* for European ISO */ \
45 K51, K13, K6A, K64, K67, /* for Japanese JIS */ \
46 K08, K10, K18, K20, K28, K30, K38, K40, K48, K50, K57, K5F, /* F13-24 */ \
47 KB7, KBF, KDE, /* System Power, Sleep, Wake */ \
48 KA3, KB2, KA1, /* Mute, Volume Up, Volume Down */ \
49 KCD, K95, KBB, KB4, KD0, /* Next, Previous, Stop, Pause, Media Select */ \
50 KC8, KAB, KC0, /* Mail, Calculator, My Computer */ \
51 K90, KBA, KB8, KB0, /* WWW Search, Home, Back, Forward */ \
52 KA8, KA0, K98 /* WWW Stop, Refresh, Favorites */ \
53) { \
54 { KC_NO, KC_##K01, KC_NO, KC_##K03, KC_##K04, KC_##K05, KC_##K06, KC_##K07 }, \
55 { KC_##K08, KC_##K09, KC_##K0A, KC_##K0B, KC_##K0C, KC_##K0D, KC_##K0E, KC_NO }, \
56 { KC_##K10, KC_##K11, KC_##K12, KC_##K13, KC_##K14, KC_##K15, KC_##K16, KC_NO }, \
57 { KC_##K18, KC_NO, KC_##K1A, KC_##K1B, KC_##K1C, KC_##K1D, KC_##K1E, KC_NO }, \
58 { KC_##K20, KC_##K21, KC_##K22, KC_##K23, KC_##K24, KC_##K25, KC_##K26, KC_NO }, \
59 { KC_##K28, KC_##K29, KC_##K2A, KC_##K2B, KC_##K2C, KC_##K2D, KC_##K2E, KC_NO }, \
60 { KC_##K30, KC_##K31, KC_##K32, KC_##K33, KC_##K34, KC_##K35, KC_##K36, KC_NO }, \
61 { KC_##K38, KC_NO, KC_##K3A, KC_##K3B, KC_##K3C, KC_##K3D, KC_##K3E, KC_NO }, \
62 { KC_##K40, KC_##K41, KC_##K42, KC_##K43, KC_##K44, KC_##K45, KC_##K46, KC_NO }, \
63 { KC_##K48, KC_##K49, KC_##K4A, KC_##K4B, KC_##K4C, KC_##K4D, KC_##K4E, KC_NO }, \
64 { KC_##K50, KC_##K51, KC_##K52, KC_NO, KC_##K54, KC_##K55, KC_NO, KC_##K57 }, \
65 { KC_##K58, KC_##K59, KC_##K5A, KC_##K5B, KC_NO, KC_##K5D, KC_NO, KC_##K5F }, \
66 { KC_NO, KC_##K61, KC_NO, KC_NO, KC_##K64, KC_NO, KC_##K66, KC_##K67 }, \
67 { KC_NO, KC_##K69, KC_##K6A, KC_##K6B, KC_##K6C, KC_NO, KC_NO, KC_NO }, \
68 { KC_##K70, KC_##K71, KC_##K72, KC_##K73, KC_##K74, KC_##K75, KC_##K76, KC_##K77 }, \
69 { KC_##K78, KC_##K79, KC_##K7A, KC_##K7B, KC_##K7C, KC_##K7D, KC_##K7E, KC_NO }, \
70 { KC_NO, KC_NO, KC_NO, KC_##K83, KC_NO, KC_NO, KC_NO, KC_NO }, \
71 { KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO }, \
72 { KC_##K90, KC_##K91, KC_NO, KC_NO, KC_##K94, KC_##K95, KC_NO, KC_NO }, \
73 { KC_##K98, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_##K9F }, \
74 { KC_##KA0, KC_##KA1, KC_NO, KC_##KA3, KC_NO, KC_NO, KC_NO, KC_##KA7 }, \
75 { KC_##KA8, KC_NO, KC_NO, KC_##KAB, KC_NO, KC_NO, KC_NO, KC_##KAF }, \
76 { KC_##KB0, KC_NO, KC_##KB2, KC_NO, KC_##KB4, KC_NO, KC_NO, KC_##KB7 }, \
77 { KC_##KB8, KC_NO, KC_##KBA, KC_##KBB, KC_NO, KC_NO, KC_NO, KC_##KBF }, \
78 { KC_##KC0, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO }, \
79 { KC_##KC8, KC_NO, KC_##KCA, KC_NO, KC_NO, KC_##KCD, KC_NO, KC_NO }, \
80 { KC_##KD0, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO }, \
81 { KC_NO, KC_NO, KC_##KDA, KC_NO, KC_NO, KC_NO, KC_##KDE, KC_NO }, \
82 { KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO }, \
83 { KC_NO, KC_##KE9, KC_NO, KC_##KEB, KC_##KEC, KC_NO, KC_NO, KC_NO }, \
84 { KC_##KF0, KC_##KF1, KC_##KF2, KC_NO, KC_##KF4, KC_##KF5, KC_NO, KC_NO }, \
85 { KC_NO, KC_NO, KC_##KFA, KC_NO, KC_##KFC, KC_##KFD, KC_##KFE, KC_NO }, \
86}
87
88/* US layout */
89#define KEYMAP( \
90 K76,K05,K06,K04,K0C,K03,K0B,K83,K0A,K01,K09,K78,K07, KFC,K7E,KFE, \
91 K0E,K16,K1E,K26,K25,K2E,K36,K3D,K3E,K46,K45,K4E,K55,K66, KF0,KEC,KFD, K77,KCA,K7C,K7B, \
92 K0D,K15,K1D,K24,K2D,K2C,K35,K3C,K43,K44,K4D,K54,K5B,K5D, KF1,KE9,KFA, K6C,K75,K7D, \
93 K58,K1C,K1B,K23,K2B,K34,K33,K3B,K42,K4B,K4C,K52, K5A, K6B,K73,K74,K79, \
94 K12,K1A,K22,K21,K2A,K32,K31,K3A,K41,K49,K4A, K59, KF5, K69,K72,K7A, \
95 K14,K9F,K11, K29, K91,KA7,KAF,K94, KEB,KF2,KF4, K70, K71,KDA \
96) \
97KEYMAP_ALL( \
98 K76,K05,K06,K04,K0C,K03,K0B,K83,K0A,K01,K09,K78,K07, KFC,K7E,KFE, \
99 K0E,K16,K1E,K26,K25,K2E,K36,K3D,K3E,K46,K45,K4E,K55,K66, KF0,KEC,KFD, K77,KCA,K7C,K7B, \
100 K0D,K15,K1D,K24,K2D,K2C,K35,K3C,K43,K44,K4D,K54,K5B,K5D, KF1,KE9,KFA, K6C,K75,K7D, \
101 K58,K1C,K1B,K23,K2B,K34,K33,K3B,K42,K4B,K4C,K52, K5A, K6B,K73,K74,K79, \
102 K12,K1A,K22,K21,K2A,K32,K31,K3A,K41,K49,K4A, K59, KF5, K69,K72,K7A, \
103 K14,K9F,K11, K29, K91,KA7,KAF,K94, KEB,KF2,KF4, K70, K71,KDA, \
104 \
105 NUBS, \
106 RO, KANA, JYEN, HENK, MHEN, \
107 F13, F14, F15, F16, F17, F18, F19, F20, F21, F22, F23, F24, \
108 SYSTEM_POWER, SYSTEM_SLEEP, SYSTEM_WAKE, \
109 AUDIO_MUTE, AUDIO_VOL_UP, AUDIO_VOL_DOWN, \
110 MEDIA_NEXT_TRACK, MEDIA_PREV_TRACK, MEDIA_STOP, MEDIA_PLAY_PAUSE, MEDIA_SELECT, \
111 MAIL, CALCULATOR, MY_COMPUTER, \
112 WWW_SEARCH, WWW_HOME, WWW_BACK, WWW_FORWARD, \
113 WWW_STOP, WWW_REFRESH, WWW_FAVORITES \
114)
115
116/* ISO layout */
117#define KEYMAP_ISO( \
118 K76,K05,K06,K04,K0C,K03,K0B,K83,K0A,K01,K09,K78,K07, KFC,K7E,KFE, \
119 K0E,K16,K1E,K26,K25,K2E,K36,K3D,K3E,K46,K45,K4E,K55,K66, KF0,KEC,KFD, K77,KCA,K7C,K7B, \
120 K0D,K15,K1D,K24,K2D,K2C,K35,K3C,K43,K44,K4D,K54,K5B, KF1,KE9,KFA, K6C,K75,K7D, \
121 K58,K1C,K1B,K23,K2B,K34,K33,K3B,K42,K4B,K4C,K52,K5D,K5A, K6B,K73,K74,K79, \
122 K12,K61,K1A,K22,K21,K2A,K32,K31,K3A,K41,K49,K4A, K59, KF5, K69,K72,K7A, \
123 K14,K9F,K11, K29, K91,KA7,KAF,K94, KEB,KF2,KF4, K70, K71,KDA \
124) \
125KEYMAP_ALL( \
126 K76,K05,K06,K04,K0C,K03,K0B,K83,K0A,K01,K09,K78,K07, KFC,K7E,KFE, \
127 K0E,K16,K1E,K26,K25,K2E,K36,K3D,K3E,K46,K45,K4E,K55,K66, KF0,KEC,KFD, K77,KCA,K7C,K7B, \
128 K0D,K15,K1D,K24,K2D,K2C,K35,K3C,K43,K44,K4D,K54,K5B,K5D, KF1,KE9,KFA, K6C,K75,K7D, \
129 K58,K1C,K1B,K23,K2B,K34,K33,K3B,K42,K4B,K4C,K52, K5A, K6B,K73,K74,K79, \
130 K12,K1A,K22,K21,K2A,K32,K31,K3A,K41,K49,K4A, K59, KF5, K69,K72,K7A, \
131 K14,K9F,K11, K29, K91,KA7,KAF,K94, KEB,KF2,KF4, K70, K71,KDA, \
132 \
133 K61, \
134 RO, KANA, JYEN, HENK, MHEN, \
135 F13, F14, F15, F16, F17, F18, F19, F20, F21, F22, F23, F24, \
136 SYSTEM_POWER, SYSTEM_SLEEP, SYSTEM_WAKE, \
137 AUDIO_MUTE, AUDIO_VOL_UP, AUDIO_VOL_DOWN, \
138 MEDIA_NEXT_TRACK, MEDIA_PREV_TRACK, MEDIA_STOP, MEDIA_PLAY_PAUSE, MEDIA_SELECT, \
139 MAIL, CALCULATOR, MY_COMPUTER, \
140 WWW_SEARCH, WWW_HOME, WWW_BACK, WWW_FORWARD, \
141 WWW_STOP, WWW_REFRESH, WWW_FAVORITES \
142)
143
144/* JIS layout */
145#define KEYMAP_JIS( \
146 K76,K05,K06,K04,K0C,K03,K0B,K83,K0A,K01,K09,K78,K07, KFC,K7E,KFE, \
147 K0E,K16,K1E,K26,K25,K2E,K36,K3D,K3E,K46,K45,K4E,K55,K6A,K66, KF0,KEC,KFD, K77,KCA,K7C,K7B, \
148 K0D,K15,K1D,K24,K2D,K2C,K35,K3C,K43,K44,K4D,K54,K5B, KF1,KE9,KFA, K6C,K75,K7D, \
149 K58,K1C,K1B,K23,K2B,K34,K33,K3B,K42,K4B,K4C,K52,K5D, K5A, K6B,K73,K74,K79, \
150 K12,K1A,K22,K21,K2A,K32,K31,K3A,K41,K49,K4A,K51, K59, KF5, K69,K72,K7A, \
151 K14,K9F,K11, K67,K29,K64,K13, K91,KA7,KAF,K94, KEB,KF2,KF4, K70, K71,KDA \
152) \
153KEYMAP_ALL( \
154 K76,K05,K06,K04,K0C,K03,K0B,K83,K0A,K01,K09,K78,K07, KFC,K7E,KFE, \
155 K0E,K16,K1E,K26,K25,K2E,K36,K3D,K3E,K46,K45,K4E,K55,K66, KF0,KEC,KFD, K77,KCA,K7C,K7B, \
156 K0D,K15,K1D,K24,K2D,K2C,K35,K3C,K43,K44,K4D,K54,K5B,K5D, KF1,KE9,KFA, K6C,K75,K7D, \
157 K58,K1C,K1B,K23,K2B,K34,K33,K3B,K42,K4B,K4C,K52, K5A, K6B,K73,K74,K79, \
158 K12,K1A,K22,K21,K2A,K32,K31,K3A,K41,K49,K4A, K59, KF5, K69,K72,K7A, \
159 K14,K9F,K11, K29, K91,KA7,KAF,K94, KEB,KF2,KF4, K70, K71,KDA, \
160 \
161 NUBS, \
162 K51, K13, K6A, K64, K67, \
163 F13, F14, F15, F16, F17, F18, F19, F20, F21, F22, F23, F24, \
164 SYSTEM_POWER, SYSTEM_SLEEP, SYSTEM_WAKE, \
165 AUDIO_MUTE, AUDIO_VOL_UP, AUDIO_VOL_DOWN, \
166 MEDIA_NEXT_TRACK, MEDIA_PREV_TRACK, MEDIA_STOP, MEDIA_PLAY_PAUSE, MEDIA_SELECT, \
167 MAIL, CALCULATOR, MY_COMPUTER, \
168 WWW_SEARCH, WWW_HOME, WWW_BACK, WWW_FORWARD, \
169 WWW_STOP, WWW_REFRESH, WWW_FAVORITES \
170)
171
172
173// Assign Fn key(0-7) to a layer to which switch with the Fn key pressed.
174static const uint8_t PROGMEM fn_layer[] = {
175 5, // Fn0
176 6, // Fn1
177 0, // Fn2
178 0, // Fn3
179 0, // Fn4
180 0, // Fn5
181 0, // Fn6
182 0 // Fn7
183};
184
185// Assign Fn key(0-7) to a keycode sent when release Fn key without use of the layer.
186// See layer.c for details.
187static const uint8_t PROGMEM fn_keycode[] = {
188 KC_SCLN, // Fn0
189 KC_SLSH, // Fn1
190 KC_NO, // Fn2
191 KC_NO, // Fn3
192 KC_NO, // Fn4
193 KC_NO, // Fn5
194 KC_NO, // Fn6
195 KC_NO // Fn7
196};
197
198
199// The keymap is a 32*8 byte array which convert a PS/2 scan code into a USB keycode.
200// See keycode.h for USB keycodes. You should omit a 'KC_' prefix of USB keycodes in keymap macro.
201// Use KEYMAP_ISO() or KEYMAP_JIS() instead of KEYMAP() if your keyboard is ISO or JIS.
202static const uint8_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
203 /* 0: default
204 * ,---. ,---------------. ,---------------. ,---------------. ,-----------. ,-----------.
205 * |Esc| |F1 |F2 |F3 |F4 | |F5 |F6 |F7 |F8 | |F9 |F10|F11|F12| |PrS|ScL|Pau| |Pwr|Slp|Wak|
206 * `---' `---------------' `---------------' `---------------' `-----------' `-----------'
207 * ,-----------------------------------------------------------. ,-----------. ,---------------.
208 * | `| 1| 2| 3| 4| 5| 6| 7| 8| 9| 0| -| =|Backspa| |Ins|Hom|PgU| |NmL| /| *| -|
209 * |-----------------------------------------------------------| |-----------| |---------------|
210 * |Tab | Q| W| E| R| T| Y| U| I| O| P| [| ]| \| |Del|End|PgD| | 7| 8| 9| |
211 * |-----------------------------------------------------------| `-----------' |-----------| +|
212 * |CapsLo| A| S| D| F| G| H| J| K| L| ;| '|Return | | 4| 5| 6| |
213 * |-----------------------------------------------------------| ,---. |---------------|
214 * |Shift | Z| X| C| V| B| N| M| ,| ,| /|Shift | |Up | | 1| 2| 3| |
215 * |-----------------------------------------------------------| ,-----------. |-----------|Ent|
216 * |Ctrl |Gui |Alt | Space |Alt |Gui |Menu|Ctrl| |Lef|Dow|Rig| | 0| .| |
217 * `-----------------------------------------------------------' `-----------' `---------------'
218 * ; = Fn0(to Layer 5)
219 * / = Fn1(to Layer 6)
220 */
221 KEYMAP(
222 ESC, F1, F2, F3, F4, F5, F6, F7, F8, F9, F10, F11, F12, PSCR,SLCK,BRK,
223 GRV, 1, 2, 3, 4, 5, 6, 7, 8, 9, 0, MINS,EQL, BSPC, INS, HOME,PGUP, NLCK,PSLS,PAST,PMNS,
224 TAB, Q, W, E, R, T, Y, U, I, O, P, LBRC,RBRC,BSLS, DEL, END, PGDN, P7, P8, P9,
225 CAPS,A, S, D, F, G, H, J, K, L, FN0, QUOT, ENT, P4, P5, P6, PPLS,
226 LSFT,Z, X, C, V, B, N, M, COMM,DOT, FN1, RSFT, UP, P1, P2, P3,
227 LCTL,LGUI,LALT, SPC, RALT,RGUI,APP, RCTL, LEFT,DOWN,RGHT, P0, PDOT,PENT
228 ),
229
230 /* 1: plain Qwerty without layer switching
231 * ,-----------------------------------------------------------.
232 * | `| 1| 2| 3| 4| 5| 6| 7| 8| 9| 0| -| =|Backspa|
233 * |-----------------------------------------------------------|
234 * |Tab | Q| W| E| R| T| Y| U| I| O| P| [| ]| \|
235 * |-----------------------------------------------------------|
236 * |CapsLo| A| S| D| F| G| H| J| K| L| ;| '|Return |
237 * |-----------------------------------------------------------|
238 * |Shift | Z| X| C| V| B| N| M| ,| ,| /|Shift |
239 * |-----------------------------------------------------------|
240 * |Ctrl |Gui |Alt | Space |Alt |Gui |Menu|Ctrl|
241 * `-----------------------------------------------------------'
242 */
243 KEYMAP(
244 ESC, F1, F2, F3, F4, F5, F6, F7, F8, F9, F10, F11, F12, PSCR,SLCK,BRK,
245 GRV, 1, 2, 3, 4, 5, 6, 7, 8, 9, 0, MINS,EQL, BSPC, INS, HOME,PGUP, NLCK,PSLS,PAST,PMNS,
246 TAB, Q, W, E, R, T, Y, U, I, O, P, LBRC,RBRC,BSLS, DEL, END, PGDN, P7, P8, P9,
247 CAPS,A, S, D, F, G, H, J, K, L, SCLN,QUOT, ENT, P4, P5, P6, PPLS,
248 LSFT,Z, X, C, V, B, N, M, COMM,DOT, SLSH, RSFT, UP, P1, P2, P3,
249 LCTL,LGUI,LALT, SPC, RALT,RGUI,APP, RCTL, LEFT,DOWN,RGHT, P0, PDOT,PENT
250 ),
251
252 /* 2: Colemak http://colemak.com
253 * ,-----------------------------------------------------------.
254 * | `| 1| 2| 3| 4| 5| 6| 7| 8| 9| 0| -| =|Backspa|
255 * |-----------------------------------------------------------|
256 * |Tab | Q| W| F| P| G| J| L| U| Y| ;| [| ]| \|
257 * |-----------------------------------------------------------|
258 * |BackSp| A| R| S| T| D| H| N| E| I| O| '|Return |
259 * |-----------------------------------------------------------|
260 * |Shift | Z| X| C| V| B| K| M| ,| ,| /|Shift |
261 * |-----------------------------------------------------------|
262 * |Ctrl |Gui |Alt | Space |Alt |Gui |Menu|Ctrl|
263 * `----------------------------------------------------------'
264 */
265 KEYMAP(
266 ESC, F1, F2, F3, F4, F5, F6, F7, F8, F9, F10, F11, F12, PSCR,SLCK,BRK,
267 GRV, 1, 2, 3, 4, 5, 6, 7, 8, 9, 0, MINS,EQL, BSPC, INS, HOME,PGUP, NLCK,PSLS,PAST,PMNS,
268 TAB, Q, W, F, P, G, J, L, U, Y, SCLN,LBRC,RBRC,BSLS, DEL, END, PGDN, P7, P8, P9,
269 BSPC,A, R, S, T, D, H, N, E, I, O, QUOT, ENT, P4, P5, P6, PPLS,
270 LSFT,Z, X, C, V, B, K, M, COMM,DOT, SLSH, RSFT, UP, P1, P2, P3,
271 LCTL,LGUI,LALT, SPC, RALT,RGUI,APP, RCTL, LEFT,DOWN,RGHT, P0, PDOT,PENT
272 ),
273
274 /* 3: Dvorak http://en.wikipedia.org/wiki/Dvorak_Simplified_Keyboard
275 * ,-----------------------------------------------------------.
276 * | `| 1| 2| 3| 4| 5| 6| 7| 8| 9| 0| [| ]|Backspa|
277 * |-----------------------------------------------------------|
278 * |Tab | '| ,| .| P| Y| F| G| C| R| L| /| =| \|
279 * |-----------------------------------------------------------|
280 * |BackSp| A| O| E| U| I| D| H| T| N| S| -|Return |
281 * |-----------------------------------------------------------|
282 * |Shift | ;| Q| J| K| X| B| M| Wl V| Z|Shift |
283 * |-----------------------------------------------------------|
284 * |Ctrl |Gui |Alt | Space |Alt |Gui |Menu|Ctrl|
285 * `-----------------------------------------------------------'
286 */
287 KEYMAP(
288 ESC, F1, F2, F3, F4, F5, F6, F7, F8, F9, F10, F11, F12, PSCR,SLCK,BRK,
289 GRV, 1, 2, 3, 4, 5, 6, 7, 8, 9, 0, LBRC,RBRC,BSPC, INS, HOME,PGUP, NLCK,PSLS,PAST,PMNS,
290 TAB, QUOT,COMM,DOT, P, Y, F, G, C, R, L, SLSH,EQL, BSLS, DEL, END, PGDN, P7, P8, P9,
291 CAPS,A, O, E, U, I, D, H, T, N, S, MINS, ENT, P4, P5, P6, PPLS,
292 LSFT,SCLN,Q, J, K, X, B, M, W, V, Z, RSFT, UP, P1, P2, P3,
293 LCTL,LGUI,LALT, SPC, RALT,RGUI,APP, RCTL, LEFT,DOWN,RGHT, P0, PDOT,PENT
294 ),
295
296 /* 4: Workman http://viralintrospection.wordpress.com/2010/09/06/a-different-philosophy-in-designing-keyboard-layouts/
297 * ,-----------------------------------------------------------.
298 * | `| 1| 2| 3| 4| 5| 6| 7| 8| 9| 0| -| =|Backspa|
299 * |-----------------------------------------------------------|
300 * |Tab | Q| D| R| W| B| J| F| U| P| ;| [| ]| \|
301 * |-----------------------------------------------------------|
302 * |CapsLo| A| S| H| T| G| Y| N| E| O| I| '|Return |
303 * |-----------------------------------------------------------|
304 * |Shift | Z| X| M| C| V| K| L| ,| ,| /|Shift |
305 * |-----------------------------------------------------------|
306 * |Ctrl |Gui |Alt | Space |Alt |Gui |Menu|Ctrl|
307 * `-----------------------------------------------------------'
308 */
309 KEYMAP(
310 ESC, F1, F2, F3, F4, F5, F6, F7, F8, F9, F10, F11, F12, PSCR,SLCK,BRK,
311 GRV, 1, 2, 3, 4, 5, 6, 7, 8, 9, 0, MINS,EQL, BSPC, INS, HOME,PGUP, NLCK,PSLS,PAST,PMNS,
312 TAB, Q, D, R, W, B, J, F, U, P, SCLN,LBRC,RBRC,BSLS, DEL, END, PGDN, P7, P8, P9,
313 BSPC,A, S, H, T, G, Y, N, E, O, I, QUOT, ENT, P4, P5, P6, PPLS,
314 LSFT,Z, X, M, C, V, K, L, COMM,DOT, SLSH, RSFT, UP, P1, P2, P3,
315 LCTL,LGUI,LALT, SPC, RALT,RGUI,APP, RCTL, LEFT,DOWN,RGHT, P0, PDOT,PENT
316 ),
317
318 /* 5: Mouse keys
319 * ,-----------------------------------------------------------.
320 * |Esc| F1| F2| F3| F4| F5| F6| F7| F8| F9|F10|F11|F12|Backspa|
321 * |-----------------------------------------------------------|
322 * |Tab |MwL|MwU|McU|WwU|WwR|MwL|MwD|MwU|MwR| | | | \|
323 * |-----------------------------------------------------------|
324 * |CapsLo| |McL|McD|McR| |McL|McD|McU|McR|Fn0| |Return |
325 * |-----------------------------------------------------------|
326 * |Shift |VoD|VoU|Mut|Mb2|Mb3|Mb2|Mb1|VoD|VoU|Mut|Shift |
327 * |-----------------------------------------------------------|
328 * |Ctrl |Gui |Alt | Mb1 |Alt |Gui |Menu|Ctrl|
329 * `-----------------------------------------------------------'
330 * Mc = mouse cursor, Mw = mouse wheel, Mb = mouse button
331 * Vo = Volume, Mut = Mute
332 */
333 KEYMAP(
334 ESC, F1, F2, F3, F4, F5, F6, F7, F8, F9, F10, F11, F12, PSCR,SLCK,BRK,
335 ESC, F1, F2, F3, F4, F5, F6, F7, F8, F8, F10, F11, F12, BSPC, INS, HOME,PGUP, NLCK,PSLS,PAST,PMNS,
336 TAB, WH_L,WH_D,MS_U,WH_U,WH_R,WH_L,WH_D,WH_U,WH_R,NO, NO, NO, BSLS, DEL, END, PGDN, P7, P8, P9,
337 CAPS,NO, MS_L,MS_D,MS_R,NO, MS_L,MS_D,MS_U,MS_R,FN0, NO, ENT, P4, P5, P6, PPLS,
338 LSFT,VOLD,VOLU,MUTE,BTN2,BTN3,BTN2,BTN1,VOLD,VOLU,MUTE, RSFT, UP, P1, P2, P3,
339 LCTL,LGUI,LALT, BTN1, RALT,RGUI,APP, RCTL, LEFT,DOWN,RGHT, P0, PDOT,PENT
340 ),
341
342 /* 6: Cursor keys
343 * ,-----------------------------------------------------------.
344 * |Esc| F1| F2| F3| F4| F5| F6| F7| F8| F9|F10|F11|F12|Backspa|
345 * |-----------------------------------------------------------|
346 * |Tab |Hom|PgU| Up|PgU|End|Hom|PgD|PgU|End| | | | \|
347 * |-----------------------------------------------------------|
348 * |CapsLo| |Lef|Dow|Rig| |Lef|Dow| Up|Rig| | |Return |
349 * |-----------------------------------------------------------|
350 * |Shift | | | | | |Hom|PgD|PgU|End|Fn1|Shift |
351 * |-----------------------------------------------------------|
352 * |Ctrl |Gui |Alt | Space |Alt |Gui |Menu|Ctrl|
353 * `-----------------------------------------------------------'
354 */
355 KEYMAP(
356 ESC, F1, F2, F3, F4, F5, F6, F7, F8, F9, F10, F11, F12, PSCR,SLCK,BRK,
357 ESC, F1, F2, F3, F4, F5, F6, F7, F8, F8, F10, F11, F12, BSPC, INS, HOME,PGUP, NLCK,PSLS,PAST,PMNS,
358 TAB, NO, NO, NO, NO, NO, HOME,PGDN,PGUP,END, NO, NO, NO, BSLS, DEL, END, PGDN, P7, P8, P9,
359 CAPS,NO, NO, NO, NO, NO, LEFT,DOWN,UP, RGHT,NO, NO, ENT, P4, P5, P6, PPLS,
360 LSFT,VOLD,VOLU,MUTE,NO, NO, HOME,PGDN,PGUP,END, FN1, RSFT, UP, P1, P2, P3,
361 LCTL,LGUI,LALT, SPC, RALT,RGUI,APP, RCTL, LEFT,DOWN,RGHT, P0, PDOT,PENT
362 ),
363};
364
365
366uint8_t keymap_get_keycode(uint8_t layer, uint8_t row, uint8_t col)
367{
368 return pgm_read_byte(&keymaps[(layer)][(row)][(col)]);
369}
370
371uint8_t keymap_fn_layer(uint8_t index)
372{
373 return pgm_read_byte(&fn_layer[index]);
374}
375
376uint8_t keymap_fn_keycode(uint8_t index)
377{
378 return pgm_read_byte(&fn_keycode[index]);
379}
diff --git a/converter/ps2_usb/keymap_common.c b/converter/ps2_usb/keymap_common.c
new file mode 100644
index 000000000..241d2e33b
--- /dev/null
+++ b/converter/ps2_usb/keymap_common.c
@@ -0,0 +1,30 @@
1/*
2Copyright 2011,2012,2013 Jun Wako <wakojun@gmail.com>
3
4This program is free software: you can redistribute it and/or modify
5it under the terms of the GNU General Public License as published by
6the Free Software Foundation, either version 2 of the License, or
7(at your option) any later version.
8
9This program is distributed in the hope that it will be useful,
10but WITHOUT ANY WARRANTY; without even the implied warranty of
11MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12GNU General Public License for more details.
13
14You should have received a copy of the GNU General Public License
15along with this program. If not, see <http://www.gnu.org/licenses/>.
16*/
17#include "keymap_common.h"
18
19
20/* translates key to keycode */
21uint8_t keymap_key_to_keycode(uint8_t layer, key_t key)
22{
23 return pgm_read_byte(&keymaps[(layer)][(key.row)][(key.col)]);
24}
25
26/* translates Fn keycode to action */
27action_t keymap_fn_to_action(uint8_t keycode)
28{
29 return (action_t){ .code = pgm_read_word(&fn_actions[FN_INDEX(keycode)]) };
30}
diff --git a/converter/ps2_usb/keymap_common.h b/converter/ps2_usb/keymap_common.h
new file mode 100644
index 000000000..216a8dc02
--- /dev/null
+++ b/converter/ps2_usb/keymap_common.h
@@ -0,0 +1,174 @@
1/*
2Copyright 2011,2012,2013 Jun Wako <wakojun@gmail.com>
3
4This program is free software: you can redistribute it and/or modify
5it under the terms of the GNU General Public License as published by
6the Free Software Foundation, either version 2 of the License, or
7(at your option) any later version.
8
9This program is distributed in the hope that it will be useful,
10but WITHOUT ANY WARRANTY; without even the implied warranty of
11MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12GNU General Public License for more details.
13
14You should have received a copy of the GNU General Public License
15along with this program. If not, see <http://www.gnu.org/licenses/>.
16*/
17#ifndef KEYMAP_COMMON_H
18#define KEYMAP_COMMON_H
19
20#include <stdint.h>
21#include <stdbool.h>
22#include <avr/pgmspace.h>
23#include "keycode.h"
24#include "action.h"
25#include "action_macro.h"
26#include "report.h"
27#include "print.h"
28#include "debug.h"
29#include "keymap.h"
30
31
32// 32*8(256) byte array which converts PS/2 code into USB code
33extern const uint8_t keymaps[][MATRIX_ROWS][MATRIX_COLS];
34extern const uint16_t fn_actions[];
35
36
37/* All keys */
38#define KEYMAP_ALL( \
39 K76,K05,K06,K04,K0C,K03,K0B,K83,K0A,K01,K09,K78,K07, KFC,K7E,KFE, \
40 K0E,K16,K1E,K26,K25,K2E,K36,K3D,K3E,K46,K45,K4E,K55,K66, KF0,KEC,KFD, K77,KCA,K7C,K7B, \
41 K0D,K15,K1D,K24,K2D,K2C,K35,K3C,K43,K44,K4D,K54,K5B,K5D, KF1,KE9,KFA, K6C,K75,K7D, \
42 K58,K1C,K1B,K23,K2B,K34,K33,K3B,K42,K4B,K4C,K52, K5A, K6B,K73,K74,K79, \
43 K12,K1A,K22,K21,K2A,K32,K31,K3A,K41,K49,K4A, K59, KF5, K69,K72,K7A, \
44 K14,K9F,K11, K29, K91,KA7,KAF,K94, KEB,KF2,KF4, K70, K71,KDA, \
45 \
46 K61, /* for European ISO */ \
47 K51, K13, K6A, K64, K67, /* for Japanese JIS */ \
48 K08, K10, K18, K20, K28, K30, K38, K40, K48, K50, K57, K5F, /* F13-24 */ \
49 KB7, KBF, KDE, /* System Power, Sleep, Wake */ \
50 KA3, KB2, KA1, /* Mute, Volume Up, Volume Down */ \
51 KCD, K95, KBB, KB4, KD0, /* Next, Previous, Stop, Pause, Media Select */ \
52 KC8, KAB, KC0, /* Mail, Calculator, My Computer */ \
53 K90, KBA, KB8, KB0, /* WWW Search, Home, Back, Forward */ \
54 KA8, KA0, K98 /* WWW Stop, Refresh, Favorites */ \
55) { \
56 { KC_NO, KC_##K01, KC_NO, KC_##K03, KC_##K04, KC_##K05, KC_##K06, KC_##K07 }, \
57 { KC_##K08, KC_##K09, KC_##K0A, KC_##K0B, KC_##K0C, KC_##K0D, KC_##K0E, KC_NO }, \
58 { KC_##K10, KC_##K11, KC_##K12, KC_##K13, KC_##K14, KC_##K15, KC_##K16, KC_NO }, \
59 { KC_##K18, KC_NO, KC_##K1A, KC_##K1B, KC_##K1C, KC_##K1D, KC_##K1E, KC_NO }, \
60 { KC_##K20, KC_##K21, KC_##K22, KC_##K23, KC_##K24, KC_##K25, KC_##K26, KC_NO }, \
61 { KC_##K28, KC_##K29, KC_##K2A, KC_##K2B, KC_##K2C, KC_##K2D, KC_##K2E, KC_NO }, \
62 { KC_##K30, KC_##K31, KC_##K32, KC_##K33, KC_##K34, KC_##K35, KC_##K36, KC_NO }, \
63 { KC_##K38, KC_NO, KC_##K3A, KC_##K3B, KC_##K3C, KC_##K3D, KC_##K3E, KC_NO }, \
64 { KC_##K40, KC_##K41, KC_##K42, KC_##K43, KC_##K44, KC_##K45, KC_##K46, KC_NO }, \
65 { KC_##K48, KC_##K49, KC_##K4A, KC_##K4B, KC_##K4C, KC_##K4D, KC_##K4E, KC_NO }, \
66 { KC_##K50, KC_##K51, KC_##K52, KC_NO, KC_##K54, KC_##K55, KC_NO, KC_##K57 }, \
67 { KC_##K58, KC_##K59, KC_##K5A, KC_##K5B, KC_NO, KC_##K5D, KC_NO, KC_##K5F }, \
68 { KC_NO, KC_##K61, KC_NO, KC_NO, KC_##K64, KC_NO, KC_##K66, KC_##K67 }, \
69 { KC_NO, KC_##K69, KC_##K6A, KC_##K6B, KC_##K6C, KC_NO, KC_NO, KC_NO }, \
70 { KC_##K70, KC_##K71, KC_##K72, KC_##K73, KC_##K74, KC_##K75, KC_##K76, KC_##K77 }, \
71 { KC_##K78, KC_##K79, KC_##K7A, KC_##K7B, KC_##K7C, KC_##K7D, KC_##K7E, KC_NO }, \
72 { KC_NO, KC_NO, KC_NO, KC_##K83, KC_NO, KC_NO, KC_NO, KC_NO }, \
73 { KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO }, \
74 { KC_##K90, KC_##K91, KC_NO, KC_NO, KC_##K94, KC_##K95, KC_NO, KC_NO }, \
75 { KC_##K98, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_##K9F }, \
76 { KC_##KA0, KC_##KA1, KC_NO, KC_##KA3, KC_NO, KC_NO, KC_NO, KC_##KA7 }, \
77 { KC_##KA8, KC_NO, KC_NO, KC_##KAB, KC_NO, KC_NO, KC_NO, KC_##KAF }, \
78 { KC_##KB0, KC_NO, KC_##KB2, KC_NO, KC_##KB4, KC_NO, KC_NO, KC_##KB7 }, \
79 { KC_##KB8, KC_NO, KC_##KBA, KC_##KBB, KC_NO, KC_NO, KC_NO, KC_##KBF }, \
80 { KC_##KC0, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO }, \
81 { KC_##KC8, KC_NO, KC_##KCA, KC_NO, KC_NO, KC_##KCD, KC_NO, KC_NO }, \
82 { KC_##KD0, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO }, \
83 { KC_NO, KC_NO, KC_##KDA, KC_NO, KC_NO, KC_NO, KC_##KDE, KC_NO }, \
84 { KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO }, \
85 { KC_NO, KC_##KE9, KC_NO, KC_##KEB, KC_##KEC, KC_NO, KC_NO, KC_NO }, \
86 { KC_##KF0, KC_##KF1, KC_##KF2, KC_NO, KC_##KF4, KC_##KF5, KC_NO, KC_NO }, \
87 { KC_NO, KC_NO, KC_##KFA, KC_NO, KC_##KFC, KC_##KFD, KC_##KFE, KC_NO }, \
88}
89
90/* US layout */
91#define KEYMAP( \
92 K76,K05,K06,K04,K0C,K03,K0B,K83,K0A,K01,K09,K78,K07, KFC,K7E,KFE, \
93 K0E,K16,K1E,K26,K25,K2E,K36,K3D,K3E,K46,K45,K4E,K55,K66, KF0,KEC,KFD, K77,KCA,K7C,K7B, \
94 K0D,K15,K1D,K24,K2D,K2C,K35,K3C,K43,K44,K4D,K54,K5B,K5D, KF1,KE9,KFA, K6C,K75,K7D, \
95 K58,K1C,K1B,K23,K2B,K34,K33,K3B,K42,K4B,K4C,K52, K5A, K6B,K73,K74,K79, \
96 K12,K1A,K22,K21,K2A,K32,K31,K3A,K41,K49,K4A, K59, KF5, K69,K72,K7A, \
97 K14,K9F,K11, K29, K91,KA7,KAF,K94, KEB,KF2,KF4, K70, K71,KDA \
98) \
99KEYMAP_ALL( \
100 K76,K05,K06,K04,K0C,K03,K0B,K83,K0A,K01,K09,K78,K07, KFC,K7E,KFE, \
101 K0E,K16,K1E,K26,K25,K2E,K36,K3D,K3E,K46,K45,K4E,K55,K66, KF0,KEC,KFD, K77,KCA,K7C,K7B, \
102 K0D,K15,K1D,K24,K2D,K2C,K35,K3C,K43,K44,K4D,K54,K5B,K5D, KF1,KE9,KFA, K6C,K75,K7D, \
103 K58,K1C,K1B,K23,K2B,K34,K33,K3B,K42,K4B,K4C,K52, K5A, K6B,K73,K74,K79, \
104 K12,K1A,K22,K21,K2A,K32,K31,K3A,K41,K49,K4A, K59, KF5, K69,K72,K7A, \
105 K14,K9F,K11, K29, K91,KA7,KAF,K94, KEB,KF2,KF4, K70, K71,KDA, \
106 \
107 NUBS, \
108 RO, KANA, JYEN, HENK, MHEN, \
109 F13, F14, F15, F16, F17, F18, F19, F20, F21, F22, F23, F24, \
110 SYSTEM_POWER, SYSTEM_SLEEP, SYSTEM_WAKE, \
111 AUDIO_MUTE, AUDIO_VOL_UP, AUDIO_VOL_DOWN, \
112 MEDIA_NEXT_TRACK, MEDIA_PREV_TRACK, MEDIA_STOP, MEDIA_PLAY_PAUSE, MEDIA_SELECT, \
113 MAIL, CALCULATOR, MY_COMPUTER, \
114 WWW_SEARCH, WWW_HOME, WWW_BACK, WWW_FORWARD, \
115 WWW_STOP, WWW_REFRESH, WWW_FAVORITES \
116)
117
118/* ISO layout */
119#define KEYMAP_ISO( \
120 K76,K05,K06,K04,K0C,K03,K0B,K83,K0A,K01,K09,K78,K07, KFC,K7E,KFE, \
121 K0E,K16,K1E,K26,K25,K2E,K36,K3D,K3E,K46,K45,K4E,K55,K66, KF0,KEC,KFD, K77,KCA,K7C,K7B, \
122 K0D,K15,K1D,K24,K2D,K2C,K35,K3C,K43,K44,K4D,K54,K5B, KF1,KE9,KFA, K6C,K75,K7D, \
123 K58,K1C,K1B,K23,K2B,K34,K33,K3B,K42,K4B,K4C,K52,K5D,K5A, K6B,K73,K74,K79, \
124 K12,K61,K1A,K22,K21,K2A,K32,K31,K3A,K41,K49,K4A, K59, KF5, K69,K72,K7A, \
125 K14,K9F,K11, K29, K91,KA7,KAF,K94, KEB,KF2,KF4, K70, K71,KDA \
126) \
127KEYMAP_ALL( \
128 K76,K05,K06,K04,K0C,K03,K0B,K83,K0A,K01,K09,K78,K07, KFC,K7E,KFE, \
129 K0E,K16,K1E,K26,K25,K2E,K36,K3D,K3E,K46,K45,K4E,K55,K66, KF0,KEC,KFD, K77,KCA,K7C,K7B, \
130 K0D,K15,K1D,K24,K2D,K2C,K35,K3C,K43,K44,K4D,K54,K5B,K5D, KF1,KE9,KFA, K6C,K75,K7D, \
131 K58,K1C,K1B,K23,K2B,K34,K33,K3B,K42,K4B,K4C,K52, K5A, K6B,K73,K74,K79, \
132 K12,K1A,K22,K21,K2A,K32,K31,K3A,K41,K49,K4A, K59, KF5, K69,K72,K7A, \
133 K14,K9F,K11, K29, K91,KA7,KAF,K94, KEB,KF2,KF4, K70, K71,KDA, \
134 \
135 K61, \
136 RO, KANA, JYEN, HENK, MHEN, \
137 F13, F14, F15, F16, F17, F18, F19, F20, F21, F22, F23, F24, \
138 SYSTEM_POWER, SYSTEM_SLEEP, SYSTEM_WAKE, \
139 AUDIO_MUTE, AUDIO_VOL_UP, AUDIO_VOL_DOWN, \
140 MEDIA_NEXT_TRACK, MEDIA_PREV_TRACK, MEDIA_STOP, MEDIA_PLAY_PAUSE, MEDIA_SELECT, \
141 MAIL, CALCULATOR, MY_COMPUTER, \
142 WWW_SEARCH, WWW_HOME, WWW_BACK, WWW_FORWARD, \
143 WWW_STOP, WWW_REFRESH, WWW_FAVORITES \
144)
145
146/* JIS layout */
147#define KEYMAP_JIS( \
148 K76,K05,K06,K04,K0C,K03,K0B,K83,K0A,K01,K09,K78,K07, KFC,K7E,KFE, \
149 K0E,K16,K1E,K26,K25,K2E,K36,K3D,K3E,K46,K45,K4E,K55,K6A,K66, KF0,KEC,KFD, K77,KCA,K7C,K7B, \
150 K0D,K15,K1D,K24,K2D,K2C,K35,K3C,K43,K44,K4D,K54,K5B, KF1,KE9,KFA, K6C,K75,K7D, \
151 K58,K1C,K1B,K23,K2B,K34,K33,K3B,K42,K4B,K4C,K52,K5D, K5A, K6B,K73,K74,K79, \
152 K12,K1A,K22,K21,K2A,K32,K31,K3A,K41,K49,K4A,K51, K59, KF5, K69,K72,K7A, \
153 K14,K9F,K11, K67,K29,K64,K13, K91,KA7,KAF,K94, KEB,KF2,KF4, K70, K71,KDA \
154) \
155KEYMAP_ALL( \
156 K76,K05,K06,K04,K0C,K03,K0B,K83,K0A,K01,K09,K78,K07, KFC,K7E,KFE, \
157 K0E,K16,K1E,K26,K25,K2E,K36,K3D,K3E,K46,K45,K4E,K55,K66, KF0,KEC,KFD, K77,KCA,K7C,K7B, \
158 K0D,K15,K1D,K24,K2D,K2C,K35,K3C,K43,K44,K4D,K54,K5B,K5D, KF1,KE9,KFA, K6C,K75,K7D, \
159 K58,K1C,K1B,K23,K2B,K34,K33,K3B,K42,K4B,K4C,K52, K5A, K6B,K73,K74,K79, \
160 K12,K1A,K22,K21,K2A,K32,K31,K3A,K41,K49,K4A, K59, KF5, K69,K72,K7A, \
161 K14,K9F,K11, K29, K91,KA7,KAF,K94, KEB,KF2,KF4, K70, K71,KDA, \
162 \
163 NUBS, \
164 K51, K13, K6A, K64, K67, \
165 F13, F14, F15, F16, F17, F18, F19, F20, F21, F22, F23, F24, \
166 SYSTEM_POWER, SYSTEM_SLEEP, SYSTEM_WAKE, \
167 AUDIO_MUTE, AUDIO_VOL_UP, AUDIO_VOL_DOWN, \
168 MEDIA_NEXT_TRACK, MEDIA_PREV_TRACK, MEDIA_STOP, MEDIA_PLAY_PAUSE, MEDIA_SELECT, \
169 MAIL, CALCULATOR, MY_COMPUTER, \
170 WWW_SEARCH, WWW_HOME, WWW_BACK, WWW_FORWARD, \
171 WWW_STOP, WWW_REFRESH, WWW_FAVORITES \
172)
173
174#endif
diff --git a/converter/ps2_usb/keymap_plain.c b/converter/ps2_usb/keymap_plain.c
new file mode 100644
index 000000000..9c6e7d9ff
--- /dev/null
+++ b/converter/ps2_usb/keymap_plain.c
@@ -0,0 +1,50 @@
1/*
2Copyright 2011,2012,2013 Jun Wako <wakojun@gmail.com>
3
4This program is free software: you can redistribute it and/or modify
5it under the terms of the GNU General Public License as published by
6the Free Software Foundation, either version 2 of the License, or
7(at your option) any later version.
8
9This program is distributed in the hope that it will be useful,
10but WITHOUT ANY WARRANTY; without even the implied warranty of
11MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12GNU General Public License for more details.
13
14You should have received a copy of the GNU General Public License
15along with this program. If not, see <http://www.gnu.org/licenses/>.
16*/
17#include "keymap_common.h"
18
19
20const uint8_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
21 /* 0: default
22 * ,---. ,---------------. ,---------------. ,---------------. ,-----------. ,-----------.
23 * |Esc| |F1 |F2 |F3 |F4 | |F5 |F6 |F7 |F8 | |F9 |F10|F11|F12| |PrS|ScL|Pau| |Pwr|Slp|Wak|
24 * `---' `---------------' `---------------' `---------------' `-----------' `-----------'
25 * ,-----------------------------------------------------------. ,-----------. ,---------------.
26 * | `| 1| 2| 3| 4| 5| 6| 7| 8| 9| 0| -| =|Backspa| |Ins|Hom|PgU| |NmL| /| *| -|
27 * |-----------------------------------------------------------| |-----------| |---------------|
28 * |Tab | Q| W| E| R| T| Y| U| I| O| P| [| ]| \| |Del|End|PgD| | 7| 8| 9| |
29 * |-----------------------------------------------------------| `-----------' |-----------| +|
30 * |CapsLo| A| S| D| F| G| H| J| K| L| ;| '|Return | | 4| 5| 6| |
31 * |-----------------------------------------------------------| ,---. |---------------|
32 * |Shift | Z| X| C| V| B| N| M| ,| ,| /|Shift | |Up | | 1| 2| 3| |
33 * |-----------------------------------------------------------| ,-----------. |-----------|Ent|
34 * |Ctrl |Gui |Alt | Space |Alt |Gui |Menu|Ctrl| |Lef|Dow|Rig| | 0| .| |
35 * `-----------------------------------------------------------' `-----------' `---------------'
36 * ; = Fn0(to Layer 5)
37 * / = Fn1(to Layer 6)
38 */
39 KEYMAP(
40 ESC, F1, F2, F3, F4, F5, F6, F7, F8, F9, F10, F11, F12, PSCR,SLCK,BRK,
41 GRV, 1, 2, 3, 4, 5, 6, 7, 8, 9, 0, MINS,EQL, BSPC, INS, HOME,PGUP, NLCK,PSLS,PAST,PMNS,
42 TAB, Q, W, E, R, T, Y, U, I, O, P, LBRC,RBRC,BSLS, DEL, END, PGDN, P7, P8, P9,
43 CAPS,A, S, D, F, G, H, J, K, L, SCLN,QUOT, ENT, P4, P5, P6, PPLS,
44 LSFT,Z, X, C, V, B, N, M, COMM,DOT, SLSH, RSFT, UP, P1, P2, P3,
45 LCTL,LGUI,LALT, SPC, RALT,RGUI,APP, RCTL, LEFT,DOWN,RGHT, P0, PDOT,PENT
46 ),
47};
48
49const uint16_t PROGMEM fn_actions[] = {
50};