[Keymap] Drashna Keymap updates for 0.21.0 (#21073)

This commit is contained in:
Drashna Jaelre 2023-05-31 11:44:06 -07:00 committed by GitHub
parent 1411c79aef
commit 3a3e5abac9
Failed to generate hash of commit
71 changed files with 1609 additions and 2215 deletions

View file

@ -74,7 +74,7 @@ bool process_record_user_rgb_matrix(uint16_t keycode, keyrecord_t *record) {
if (record->event.pressed) {
userspace_config.rgb_matrix_idle_anim ^= 1;
dprintf("RGB Matrix Idle Animation [EEPROM]: %u\n", userspace_config.rgb_matrix_idle_anim);
eeconfig_update_user(userspace_config.raw);
eeconfig_update_user_config(&userspace_config.raw);
if (userspace_config.rgb_matrix_idle_anim) {
rgb_matrix_mode_noeeprom(RGB_MATRIX_TYPING_HEATMAP);
}
@ -146,3 +146,45 @@ __attribute__((weak)) bool rgb_matrix_indicators_keymap(void) {
bool rgb_matrix_indicators_user(void) {
return rgb_matrix_indicators_keymap();
}
//----------------------------------------------------------
// RGB Matrix naming
#include <rgb_matrix.h>
#if defined(RGB_MATRIX_EFFECT)
# undef RGB_MATRIX_EFFECT
#endif // defined(RGB_MATRIX_EFFECT)
#define RGB_MATRIX_EFFECT(x) RGB_MATRIX_EFFECT_##x,
enum {
RGB_MATRIX_EFFECT_NONE,
#include "rgb_matrix_effects.inc"
#undef RGB_MATRIX_EFFECT
#ifdef RGB_MATRIX_CUSTOM_KB
# include "rgb_matrix_kb.inc"
#endif
#ifdef RGB_MATRIX_CUSTOM_USER
# include "rgb_matrix_user.inc"
#endif
};
#define RGB_MATRIX_EFFECT(x) \
case RGB_MATRIX_EFFECT_##x: \
return #x;
const char* rgb_matrix_name(uint8_t effect) {
switch (effect) {
case RGB_MATRIX_EFFECT_NONE:
return "NONE";
#include "rgb_matrix_effects.inc"
#undef RGB_MATRIX_EFFECT
#ifdef RGB_MATRIX_CUSTOM_KB
# include "rgb_matrix_kb.inc"
#endif
#ifdef RGB_MATRIX_CUSTOM_USER
# include "rgb_matrix_user.inc"
#endif
default:
return "UNKNOWN";
}
}