X-Git-Url: https://git.friedersdorff.com/?a=blobdiff_plain;f=tmk_core%2Fcommon%2Fcommand.c;h=bb471e887e5d7de3638888c1062a623f4616f9e3;hb=e109b5504beb9f3e6bee6e381ee601a0cd3fae5f;hp=6920970020cc3f0a8ec72e645940b39132074362;hpb=53bd4a01be5c4327462e6c6620ea7670eddca6f2;p=max%2Ftmk_keyboard.git diff --git a/tmk_core/common/command.c b/tmk_core/common/command.c index 69209700..bb471e88 100644 --- a/tmk_core/common/command.c +++ b/tmk_core/common/command.c @@ -182,14 +182,22 @@ static bool command_common(uint8_t code) { #ifdef KEYBOARD_LOCK_ENABLE static host_driver_t *host_driver = 0; +#endif +#ifdef SLEEP_LED_ENABLE + static bool sleep_led_test = false; #endif switch (code) { #ifdef SLEEP_LED_ENABLE case KC_Z: // test breathing sleep LED print("Sleep LED test\n"); - sleep_led_toggle(); - led_set(host_keyboard_leds()); + if (sleep_led_test) { + sleep_led_disable(); + led_set(host_keyboard_leds()); + } else { + sleep_led_enable(); + } + sleep_led_test = !sleep_led_test; break; #endif #ifdef BOOTMAGIC_ENABLE