diff --git a/keyboards/zsa/moonlander/moonlander.c b/keyboards/zsa/moonlander/moonlander.c index b167cd18bcee..9926688d25ad 100644 --- a/keyboards/zsa/moonlander/moonlander.c +++ b/keyboards/zsa/moonlander/moonlander.c @@ -120,10 +120,11 @@ void keyboard_pre_init_kb(void) { layer_state_t layer_state_set_kb(layer_state_t state) { #if !defined(MOONLANDER_USER_LEDS) state = layer_state_set_user(state); - if (is_launching || !keyboard_config.led_level) return state; -#ifdef ORYX_ENABLE +# ifdef ORYX_ENABLE + layer_state_set_oryx(state); if (rawhid_state.status_led_control) return state; -#endif +# endif + if (is_launching || !keyboard_config.led_level) return state; bool LED_1 = false; bool LED_2 = false; bool LED_3 = false; @@ -172,9 +173,6 @@ layer_state_t layer_state_set_kb(layer_state_t state) { #if !defined(CAPS_LOCK_STATUS) STATUS_LED_6(LED_6); #endif -#endif -#ifdef ORYX_ENABLE - layer_state_set_oryx(state); #endif return state; diff --git a/keyboards/zsa/voyager/voyager.c b/keyboards/zsa/voyager/voyager.c index a4456613f9ea..d2ae00e57997 100644 --- a/keyboards/zsa/voyager/voyager.c +++ b/keyboards/zsa/voyager/voyager.c @@ -96,10 +96,11 @@ void keyboard_pre_init_kb(void) { layer_state_t layer_state_set_kb(layer_state_t state) { state = layer_state_set_user(state); #if !defined(VOYAGER_USER_LEDS) - if (is_launching || !keyboard_config.led_level) return state; # ifdef ORYX_ENABLE + layer_state_set_oryx(state); if (rawhid_state.status_led_control) return state; # endif + if (is_launching || !keyboard_config.led_level) return state; uint8_t layer = get_highest_layer(state); STATUS_LED_1(layer & (1 << 0)); STATUS_LED_2(layer & (1 << 1)); @@ -107,9 +108,6 @@ layer_state_t layer_state_set_kb(layer_state_t state) { # if !defined(CAPS_LOCK_STATUS) STATUS_LED_4(layer & (1 << 3)); # endif -#endif -#ifdef ORYX_ENABLE - layer_state_set_oryx(state); #endif return state; }