mirror of
https://github.com/qmk/qmk_firmware.git
synced 2025-07-19 22:22:03 +00:00
Update m7.c
This commit is contained in:
parent
21decafb68
commit
e6d4a20929
@ -107,3 +107,38 @@ const snled27351_led_t PROGMEM g_snled27351_leds[SNLED27351_LED_COUNT] = {
|
|||||||
{1, J_10, K_10, L_10},
|
{1, J_10, K_10, L_10},
|
||||||
};
|
};
|
||||||
#endif
|
#endif
|
||||||
|
bool process_record_kb(uint16_t keycode, keyrecord_t *record)
|
||||||
|
{
|
||||||
|
if (!process_record_user(keycode, record)) {
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
switch (keycode)
|
||||||
|
{
|
||||||
|
case RGB_TOG:
|
||||||
|
if (record->event.pressed)
|
||||||
|
{
|
||||||
|
switch (rgb_matrix_get_flags())
|
||||||
|
{
|
||||||
|
case LED_FLAG_ALL:
|
||||||
|
{
|
||||||
|
rgb_matrix_set_flags(LED_FLAG_NONE);
|
||||||
|
rgb_matrix_set_color_all(0, 0, 0);
|
||||||
|
}
|
||||||
|
break;
|
||||||
|
default:
|
||||||
|
{
|
||||||
|
rgb_matrix_set_flags(LED_FLAG_ALL);
|
||||||
|
}
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
if (!rgb_matrix_is_enabled())
|
||||||
|
{
|
||||||
|
rgb_matrix_set_flags(LED_FLAG_ALL);
|
||||||
|
rgb_matrix_enable();
|
||||||
|
}
|
||||||
|
return false;
|
||||||
|
default:
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user