rgblight_setrgb_at(0,0,0,1);// [..., 1] = middle LED
rgblight_setrgb_at(0,0,0,2);// [..., 2] = bottom LED
}
//Indicator light function
boolled_update_kb(led_tled_state){
boolres=led_update_user(led_state);
if(res){
// writePin(B12, !led_state.caps_lock); //Un-comment this line to enable in-switch capslock indicator
if(led_state.caps_lock){
rgblight_setrgb_at(0,255,0,0);//green
}else{
rgblight_setrgb_at(0,0,0,0);
}
if(led_state.num_lock){
rgblight_setrgb_at(0,0,255,1);//blue
}else{
rgblight_setrgb_at(0,0,0,1);
}
if(led_state.scroll_lock){
rgblight_setrgb_at(255,0,0,2);//red
}else{
rgblight_setrgb_at(0,0,0,2);
}
}
returnres;
}
//Below is an exmaple of layer indication using one of the RGB indicatiors. As configured, uses the bottom indicator (2) to light up red when layer 1 is in use.