aboutsummaryrefslogtreecommitdiff
path: root/ps2_usb
diff options
context:
space:
mode:
Diffstat (limited to 'ps2_usb')
-rw-r--r--ps2_usb/Makefile18
-rw-r--r--ps2_usb/Makefile.vusb19
-rw-r--r--ps2_usb/config_pjrc.h4
-rw-r--r--ps2_usb/config_vusb.h4
-rw-r--r--ps2_usb/keymap.c6
-rw-r--r--ps2_usb/matrix.c1
6 files changed, 27 insertions, 25 deletions
diff --git a/ps2_usb/Makefile b/ps2_usb/Makefile
index a548b56d4..7352f6b13 100644
--- a/ps2_usb/Makefile
+++ b/ps2_usb/Makefile
@@ -13,11 +13,11 @@ COMMON_DIR = ..
13TARGET_DIR = . 13TARGET_DIR = .
14 14
15# keyboard dependent files 15# keyboard dependent files
16TARGET_SRC = main_pjrc.c \ 16SRC = main.c \
17 keymap.c \ 17 keymap.c \
18 matrix.c \ 18 matrix.c \
19 led.c \ 19 led.c \
20 ps2.c 20 ps2.c
21 21
22CONFIG_H = config_pjrc.h 22CONFIG_H = config_pjrc.h
23 23
@@ -42,8 +42,8 @@ F_CPU = 16000000
42# comment out to disable the options. 42# comment out to disable the options.
43# 43#
44MOUSEKEY_ENABLE = yes # Mouse keys 44MOUSEKEY_ENABLE = yes # Mouse keys
45USB_EXTRA_ENABLE = yes # Audio control and System control 45EXTRAKEY_ENABLE = yes # Audio control and System control
46USB_NKRO_ENABLE = yes # USB Nkey Rollover 46NKRO_ENABLE = yes # USB Nkey Rollover
47 47
48 48
49 49
@@ -52,5 +52,5 @@ PROGRAM_CMD = teensy_loader_cli -mmcu=$(MCU) -w -v $(TARGET).hex
52 52
53 53
54 54
55include $(COMMON_DIR)/Makefile.pjrc 55include $(COMMON_DIR)/pjrc.mk
56include $(COMMON_DIR)/Makefile.common 56include $(COMMON_DIR)/common.mk
diff --git a/ps2_usb/Makefile.vusb b/ps2_usb/Makefile.vusb
index ff86d7998..5b6978f01 100644
--- a/ps2_usb/Makefile.vusb
+++ b/ps2_usb/Makefile.vusb
@@ -13,11 +13,11 @@ COMMON_DIR = ..
13TARGET_DIR = . 13TARGET_DIR = .
14 14
15# keyboard dependent files 15# keyboard dependent files
16TARGET_SRC = main_vusb.c \ 16SRC = main.c \
17 keymap.c \ 17 keymap.c \
18 matrix.c \ 18 matrix.c \
19 led.c \ 19 led.c \
20 ps2_usart.c 20 ps2_usart.c
21 21
22CONFIG_H = config_vusb.h 22CONFIG_H = config_vusb.h
23 23
@@ -48,8 +48,9 @@ F_CPU = 20000000
48# comment out to disable the options. 48# comment out to disable the options.
49# 49#
50MOUSEKEY_ENABLE = yes # Mouse keys 50MOUSEKEY_ENABLE = yes # Mouse keys
51USB_EXTRA_ENABLE = yes # Audio control and System control 51EXTRAKEY_ENABLE = yes # Audio control and System control
52#USB_NKRO_ENABLE = yes # USB Nkey Rollover 52#NKRO_ENABLE = yes # USB Nkey Rollover
53NO_UART = yes # UART is unavailable
53 54
54 55
55 56
@@ -85,5 +86,5 @@ PROGRAM_CMD = $(AVRDUDE) $(AVRDUDE_FLAGS) $(AVRDUDE_WRITE_FLASH) $(AVRDUDE_WRITE
85 86
86 87
87 88
88include $(COMMON_DIR)/Makefile.vusb 89include $(COMMON_DIR)/vusb.mk
89include $(COMMON_DIR)/Makefile.common 90include $(COMMON_DIR)/common.mk
diff --git a/ps2_usb/config_pjrc.h b/ps2_usb/config_pjrc.h
index 56917beec..883ffab27 100644
--- a/ps2_usb/config_pjrc.h
+++ b/ps2_usb/config_pjrc.h
@@ -35,8 +35,8 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
35 35
36/* key combination for command */ 36/* key combination for command */
37#define IS_COMMAND() ( \ 37#define IS_COMMAND() ( \
38 keyboard_report->mods == (BIT_LSHIFT | BIT_RSHIFT) || \ 38 keyboard_report->mods == (MOD_BIT(KB_LSHIFT) | MOD_BIT(KB_RSHIFT)) || \
39 keyboard_report->mods == (BIT_LCTRL | BIT_RSHIFT) \ 39 keyboard_report->mods == (MOD_BIT(KB_LCTRL) | MOD_BIT(KB_RSHIFT)) \
40) 40)
41 41
42 42
diff --git a/ps2_usb/config_vusb.h b/ps2_usb/config_vusb.h
index 426bb61e2..afd2f7911 100644
--- a/ps2_usb/config_vusb.h
+++ b/ps2_usb/config_vusb.h
@@ -35,8 +35,8 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
35 35
36/* key combination for command */ 36/* key combination for command */
37#define IS_COMMAND() ( \ 37#define IS_COMMAND() ( \
38 keyboard_report->mods == (BIT_LSHIFT | BIT_RSHIFT) || \ 38 keyboard_report->mods == (MOD_BIT(KB_LSHIFT) | MOD_BIT(KB_RSHIFT)) || \
39 keyboard_report->mods == (BIT_LCTRL | BIT_RSHIFT) \ 39 keyboard_report->mods == (MOD_BIT(KB_LCTRL) | MOD_BIT(KB_RSHIFT)) \
40) 40)
41 41
42 42
diff --git a/ps2_usb/keymap.c b/ps2_usb/keymap.c
index ef11daa28..e84e8c29b 100644
--- a/ps2_usb/keymap.c
+++ b/ps2_usb/keymap.c
@@ -124,7 +124,7 @@ static const uint8_t PROGMEM fn_layer[] = {
124static const uint8_t PROGMEM fn_keycode[] = { 124static const uint8_t PROGMEM fn_keycode[] = {
125 KB_SCLN, // Fn0 125 KB_SCLN, // Fn0
126 KB_SLSH, // Fn1 126 KB_SLSH, // Fn1
127 KB_A, // Fn2 127 KB_NO, // Fn2
128 KB_NO, // Fn3 128 KB_NO, // Fn3
129 KB_NO, // Fn4 129 KB_NO, // Fn4
130 KB_NO, // Fn5 130 KB_NO, // Fn5
@@ -154,7 +154,7 @@ static const uint8_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
154 ESC, F1, F2, F3, F4, F5, F6, F7, F8, F9, F10, F11, F12, PSCR,SLCK,BRK, 154 ESC, F1, F2, F3, F4, F5, F6, F7, F8, F9, F10, F11, F12, PSCR,SLCK,BRK,
155 GRV, 1, 2, 3, 4, 5, 6, 7, 8, 9, 0, MINS,EQL, BSPC, INS, HOME,PGUP, NLCK,PSLS,PAST,PMNS, 155 GRV, 1, 2, 3, 4, 5, 6, 7, 8, 9, 0, MINS,EQL, BSPC, INS, HOME,PGUP, NLCK,PSLS,PAST,PMNS,
156 TAB, Q, W, E, R, T, Y, U, I, O, P, LBRC,RBRC,BSLS, DEL, END, PGDN, P7, P8, P9, 156 TAB, Q, W, E, R, T, Y, U, I, O, P, LBRC,RBRC,BSLS, DEL, END, PGDN, P7, P8, P9,
157 CAPS,FN2, S, D, F, G, H, J, K, L, FN0, QUOT, ENT, P4, P5, P6, PPLS, 157 CAPS,A, S, D, F, G, H, J, K, L, FN0, QUOT, ENT, P4, P5, P6, PPLS,
158 LSFT,Z, X, C, V, B, N, M, COMM,DOT, FN1, RSFT, UP, P1, P2, P3, 158 LSFT,Z, X, C, V, B, N, M, COMM,DOT, FN1, RSFT, UP, P1, P2, P3,
159 LCTL,LGUI,LALT, SPC, RALT,RGUI,APP, RCTL, LEFT,DOWN,RGHT, P0, PDOT,PENT 159 LCTL,LGUI,LALT, SPC, RALT,RGUI,APP, RCTL, LEFT,DOWN,RGHT, P0, PDOT,PENT
160 ), 160 ),
@@ -204,7 +204,7 @@ static const uint8_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
204 ESC, F1, F2, F3, F4, F5, F6, F7, F8, F9, F10, F11, F12, PSCR,SLCK,BRK, 204 ESC, F1, F2, F3, F4, F5, F6, F7, F8, F9, F10, F11, F12, PSCR,SLCK,BRK,
205 ESC, F1, F2, F3, F4, F5, F6, F7, F8, F8, F10, F11, F12, BSPC, INS, HOME,PGUP, NLCK,PSLS,PAST,PMNS, 205 ESC, F1, F2, F3, F4, F5, F6, F7, F8, F8, F10, F11, F12, BSPC, INS, HOME,PGUP, NLCK,PSLS,PAST,PMNS,
206 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, 206 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,
207 CAPS,FN2, MS_L,MS_D,MS_R,NO, MS_L,MS_D,MS_U,MS_R,FN0, NO, ENT, P4, P5, P6, PPLS, 207 CAPS,NO, MS_L,MS_D,MS_R,NO, MS_L,MS_D,MS_U,MS_R,FN0, NO, ENT, P4, P5, P6, PPLS,
208 LSFT,VOLD,VOLU,MUTE,BTN2,BTN3,BTN2,BTN1,VOLD,VOLU,MUTE, RSFT, UP, P1, P2, P3, 208 LSFT,VOLD,VOLU,MUTE,BTN2,BTN3,BTN2,BTN1,VOLD,VOLU,MUTE, RSFT, UP, P1, P2, P3,
209 LCTL,LGUI,LALT, BTN1, RALT,RGUI,APP, RCTL, LEFT,DOWN,RGHT, P0, PDOT,PENT 209 LCTL,LGUI,LALT, BTN1, RALT,RGUI,APP, RCTL, LEFT,DOWN,RGHT, P0, PDOT,PENT
210 ), 210 ),
diff --git a/ps2_usb/matrix.c b/ps2_usb/matrix.c
index 5d73cc2a3..1aac3f866 100644
--- a/ps2_usb/matrix.c
+++ b/ps2_usb/matrix.c
@@ -349,6 +349,7 @@ uint8_t matrix_scan(void)
349 default: 349 default:
350 state = INIT; 350 state = INIT;
351 } 351 }
352 phex(code);
352 } 353 }
353 return 1; 354 return 1;
354} 355}