Skip to content

Commit

Permalink
Only include keyboard lock code when it's enabled
Browse files Browse the repository at this point in the history
  • Loading branch information
drashna committed Feb 24, 2025
1 parent 767391e commit 44638e0
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion keyboards/work_louder/work_board/keymaps/drashna/keymap.c
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,9 @@
// SPDX-License-Identifier: GPL-3.0-or-later

#include "drashna.h"
#ifdef KEYBOARD_LOCK_ENABLE
# include "features/keyboard_lock.h"
#endif // KEYBOARD_LOCK_ENABLE

#define PLNK_1 SP_LWER
#define PLNK_2 BK_LWER
Expand Down Expand Up @@ -102,9 +105,12 @@ bool rgb_matrix_indicators_advanced_keymap(uint8_t led_min, uint8_t led_max) {
#define THUMB_LED 6
#define RGB_MATRIX_INDICATOR_SET_COLOR_wrapper(...) RGB_MATRIX_INDICATOR_SET_COLOR(__VA_ARGS__)

#ifdef KEYBOARD_LOCK_ENABLE
if (get_keyboard_lock()) {
RGB_MATRIX_INDICATOR_SET_COLOR_wrapper(THUMB_LED, RGB_OFF);
} else {
} else
#endif
{
switch (get_highest_layer(default_layer_state)) {
case _DEFAULT_LAYER_1:
RGB_MATRIX_INDICATOR_SET_COLOR_wrapper(THUMB_LED, DEFAULT_LAYER_1_RGB);
Expand Down

0 comments on commit 44638e0

Please sign in to comment.