diff --git a/keyboards/40percentclub/gherkin/keymaps/default/keymap.c b/keyboards/40percentclub/gherkin/keymaps/default/keymap.c index ab2a1fa1c14..f4d3032857c 100644 --- a/keyboards/40percentclub/gherkin/keymaps/default/keymap.c +++ b/keyboards/40percentclub/gherkin/keymaps/default/keymap.c @@ -59,16 +59,17 @@ void keyboard_pre_init_user(void) { setPinOutput(B0); } -void led_set_user(uint8_t usb_led) { - if (IS_LED_ON(usb_led, USB_LED_NUM_LOCK)) { +bool led_update_user(led_t led_state) { + if (led_state.num_lock) { writePinLow(D5); } else { writePinHigh(D5); } - if (IS_LED_ON(usb_led, USB_LED_CAPS_LOCK)) { + if (led_state.caps_lock) { writePinLow(B0); } else { writePinHigh(B0); } + return false; } diff --git a/keyboards/contra/keymaps/maxr1998/keymap.c b/keyboards/contra/keymaps/maxr1998/keymap.c index 8a56c607461..0802a211f06 100644 --- a/keyboards/contra/keymaps/maxr1998/keymap.c +++ b/keyboards/contra/keymaps/maxr1998/keymap.c @@ -176,10 +176,11 @@ void update_tri_layer_user(void) { } } -void led_set_user(uint8_t usb_led) { +bool led_update_user(led_t led_state) { // Force-enable Numlock - if (!(usb_led & (1<. * both regular threads and ISRs, unlocked (during resume-from-sleep). * In particular, I2C functions (interrupt-driven) should NOT be called from here. */ -void led_set(uint8_t usb_led) { - msg_t msg; - - if (usb_led & (1<event.pressed) { layer_invert(L_NUMPAD); - bool num_lock = host_keyboard_leds() & 1<. /* FIXME: Add doxygen comments here. */ /* keyboard LEDs */ -#define USB_LED_NUM_LOCK 0 #define USB_LED_CAPS_LOCK 1 #ifdef __cplusplus diff --git a/users/doogle999/doogle999.c b/users/doogle999/doogle999.c index 5d71599687a..a5bd637ecea 100644 --- a/users/doogle999/doogle999.c +++ b/users/doogle999/doogle999.c @@ -389,7 +389,7 @@ bool process_record_user(uint16_t keycode, keyrecord_t* record) /* KC_KP_1, KC_KP_2, ..., KC_KP_0, KC_KP_DOT */ (keycode >= KC_KP_1 && keycode <= KC_KP_DOT); - if(numpadKeyPressed && !(host_keyboard_leds() & (1 << USB_LED_NUM_LOCK))) + if(numpadKeyPressed && !host_keyboard_led_state().num_lock) { add_key(KC_NUM_LOCK); send_keyboard_report();