summaryrefslogtreecommitdiff
path: root/command.c
diff options
context:
space:
mode:
authortmk2011-02-22 01:21:53 +0900
committertmk2011-02-22 03:09:23 +0900
commitd2b9489a5e19fabb5d6ec285192b19dc25b36d5e (patch)
treeee312006103ccf8f6e18a54e9bca920700d0100d /command.c
parent60052acc0fe3e6429f5c1d24073b1f6af019bd19 (diff)
fixed hhkb to comply new API.
Diffstat (limited to 'command.c')
-rw-r--r--command.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/command.c b/command.c
index 0152ccd87..7afed5d7b 100644
--- a/command.c
+++ b/command.c
@@ -32,7 +32,7 @@ uint8_t command_proc(void)
uint8_t processed = 1;
bool last_print_enable = print_enable;
print_enable = true;
- switch (keyboard_report->keys[0]) {
+ switch (host_get_first_key()) {
case KB_H:
help();
break;
@@ -89,7 +89,7 @@ uint8_t command_proc(void)
print("timer: "); phex16(timer_count); print("\n");
break;
case KB_P: // print toggle
- if (print_enable) {
+ if (last_print_enable) {
print("print disabled.\n");
last_print_enable = false;
} else {
@@ -107,6 +107,7 @@ uint8_t command_proc(void)
break;
#ifdef USB_NKRO_ENABLE
case KB_N:
+ // send empty report before change
host_clear_keyboard_report();
host_send_keyboard_report();
keyboard_nkro = !keyboard_nkro;