Closed DreamingLamb closed 10 months ago
@DreamingLamb I haven't compiled this one in a bit. I'll pull and try to get you an answer over the weekend. More than likely something deprecated. I know in the past I have used bool instead of void on the keymap.c with a return 1 at the end, and its worked fine. But other reported issues so I changed it to void.
Thanks for any time you can spend on this! Really want a CapsLock LED before I commit to buying another GMMK2.
I saw the change the fixed #5 & #6, but if I'm honest, I haven't tried rolling back to that and testing it
Finally had some more time and brain power to look at this and this should do the job:
bool rgb_matrix_indicators_advanced_user(uint8_t led_min, uint8_t led_max) {
if (host_keyboard_led_state().caps_lock) {
RGB_MATRIX_INDICATOR_SET_COLOR(54, 255, 255, 255); // assuming caps lock is at led #54
} else {
RGB_MATRIX_INDICATOR_SET_COLOR(54, 0, 0, 0);
}
return false;
}
That'll set Caps to white when on. I've compiled the ISO version and pushed it to my board and it is' working.
@skitzo2000 This might be useful to someone, so I'll add it here too, not sure if you want to add it to your code/have it commented out to help people. Code below will allow toggling the Num Lock and Caps Lock keys independently, although with a Red LED.
//Sheep's Modifier key LED toggles
bool rgb_matrix_indicators_advanced_user(uint8_t led_min, uint8_t led_max) {
if (host_keyboard_led_state().caps_lock) {
RGB_MATRIX_INDICATOR_SET_COLOR(54, 255, 0, 0); // Assuming Caps Lock is at LED #54
} else {
RGB_MATRIX_INDICATOR_SET_COLOR(54, 0, 0, 0);
}
if (host_keyboard_led_state().num_lock) {
RGB_MATRIX_INDICATOR_SET_COLOR(32, 255, 0, 0); // Assuming Num Lock is at LED #32
} else {
RGB_MATRIX_INDICATOR_SET_COLOR(32, 0, 0, 0);
}
return false;
}
//End of Sheep's Modifier key LED toggles
edit: Code brackets aren't working properly....
Awesome @DreamingLamb I'm so glad you got this figured out. I just haven't had enough time.
The code looks great. If you want feel free to make a pull request on my repo. I would be happy to include some new code!
Hey skitzo2000,
I'm trying to compile your keymap but keep getting the error below (yes, I'm trying to map for an ISO, with my own mapping, but I have also tried with your mappings and ANSI):