1
0

Get rid of USB_LED_CAPS_LOCK (#21436)

This commit is contained in:
Ryan
2023-07-06 18:48:02 +10:00
committed by GitHub
parent 928e03e8d6
commit 87b11345a5
70 changed files with 214 additions and 226 deletions

View File

@@ -351,11 +351,11 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) {
return true;
}
void led_set_user(uint8_t usb_led) {
if (usb_led & (1<<USB_LED_CAPS_LOCK)){
bool led_update_user(led_t led_state) {
if (led_state.caps_lock){
frenchdev_led_3_on();
} else {
frenchdev_led_3_off();
}
return ;
return false;
}

View File

@@ -67,24 +67,6 @@ oled_rotation_t oled_init_user(oled_rotation_t rotation) {
return OLED_ROTATION_180;
}
bool oled_task_user(void) {
// Host Keyboard Layer Status
/*oled_write_P(PSTR("Lyr: "), false);
switch (get_highest_layer(layer_state)) {
case 0:
oled_write_P(PSTR("Alpha\n"), false);
break;
case 1:
oled_write_P(PSTR("FN\n"), false);
break;
default:
// Or use the write_ln shortcut over adding '\n' to the end of your string
oled_write_ln_P(PSTR("Undefined"), false);
}
uint8_t led_usb_state = host_keyboard_leds();
oled_write_P(led_usb_state & (1<<USB_LED_CAPS_LOCK) ? PSTR("CAPLCK ") : PSTR(" "), false);
*/
static const char PROGMEM qmk_logo[] = {
0x80,0x81,0x82,0x83,0x84,0x85,0x86,0x87,0x88,0x89,0x8a,0x8b,0x8c,0x8d,0x8e,0x8f,0x90,0x91,0x92,0x93,0x94,
0xa0,0xa1,0xa2,0xa3,0xa4,0xa5,0xa6,0xa7,0xa8,0xa9,0xaa,0xab,0xac,0xad,0xae,0xaf,0xb0,0xb1,0xb2,0xb3,0xb4,

View File

@@ -1303,8 +1303,8 @@ void turn_off_capslock(void) {
rgbsps_send();
}
void led_set_user(uint8_t usb_led) {
bool new_capslock = usb_led & (1<<USB_LED_CAPS_LOCK);
bool led_update_user(led_t led_state) {
bool new_capslock = led_state.caps_lock;
if (new_capslock ^ capslock) { // capslock state is different
if ((capslock = new_capslock)) {
rgbsps_set(LED_IND_CAPSLOCK, THEME_COLOR_CAPSLOCK);
@@ -1313,6 +1313,7 @@ void turn_off_capslock(void) {
}
rgbsps_send();
}
return false;
}
#endif

View File

@@ -1306,8 +1306,8 @@ void turn_off_capslock(void) {
rgbsps_send();
}
void led_set_user(uint8_t usb_led) {
bool new_capslock = usb_led & (1<<USB_LED_CAPS_LOCK);
bool led_update_user(led_t led_state) {
bool new_capslock = led_state.caps_lock;
if (new_capslock ^ capslock) { // capslock state is different
if ((capslock = new_capslock)) {
rgbsps_set(LED_IND_CAPSLOCK, THEME_COLOR_CAPSLOCK);
@@ -1316,6 +1316,7 @@ void turn_off_capslock(void) {
}
rgbsps_send();
}
return false;
}
#endif