X-Git-Url: https://git.friedersdorff.com/?a=blobdiff_plain;f=command.c;h=cd51b79cb30f2cb532ce44981d83244e92f1de81;hb=068c31a7ba9fc6aea33f69c0edb30ad195c320ec;hp=0152ccd87b1a684da7931d4843c2966bbd1eb192;hpb=fb8d23c60c757d5d9c2270cb0123a53be2049a28;p=max%2Ftmk_keyboard.git diff --git a/command.c b/command.c old mode 100644 new mode 100755 index 0152ccd8..cd51b79c --- 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 { @@ -102,11 +102,15 @@ uint8_t command_proc(void) print("UDCON: "); phex(UDCON); print("\n"); print("UDIEN: "); phex(UDIEN); print("\n"); print("UDINT: "); phex(UDINT); print("\n"); - print("host_keyboard_leds:"); phex(host_keyboard_leds()); print("\n"); + print("usb_keyboard_leds:"); phex(usb_keyboard_leds); print("\n"); + print("usb_keyboard_protocol: "); phex(usb_keyboard_protocol); print("\n"); + print("usb_keyboard_idle_config:"); phex(usb_keyboard_idle_config); print("\n"); + print("usb_keyboard_idle_count:"); phex(usb_keyboard_idle_count); print("\n"); #endif 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;