forked from mirrors/qmk_userspace
[Keymap] Drashna Keymap updates for 0.21.0 (#21073)
This commit is contained in:
parent
1411c79aef
commit
3a3e5abac9
71 changed files with 1609 additions and 2215 deletions
|
@ -6,7 +6,7 @@
|
|||
#define RGB_MATRIX_KEYPRESSES // reacts to keypresses (will slow down matrix scan by a lot)
|
||||
// # define RGB_MATRIX_KEYRELEASES // reacts to keyreleases (not recommened)
|
||||
#define RGB_MATRIX_FRAMEBUFFER_EFFECTS
|
||||
// # define RGB_DISABLE_WHEN_USB_SUSPENDED // turn off effects when suspended
|
||||
#define RGB_DISABLE_WHEN_USB_SUSPENDED // turn off effects when suspended
|
||||
|
||||
#undef ENABLE_RGB_MATRIX_ALPHAS_MODS
|
||||
#undef ENABLE_RGB_MATRIX_GRADIENT_UP_DOWN
|
||||
|
|
|
@ -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";
|
||||
}
|
||||
}
|
||||
|
|
|
@ -13,3 +13,5 @@ void rgb_matrix_layer_helper(uint8_t hue, uint8_t sat, uint8_t val, uint8_t mode
|
|||
|
||||
bool rgb_matrix_indicators_advanced_keymap(uint8_t led_min, uint8_t led_max);
|
||||
bool rgb_matrix_indicators_keymap(void);
|
||||
|
||||
const char* rgb_matrix_name(uint8_t effect);
|
||||
|
|
|
@ -11,6 +11,9 @@ void rgblight_sethsv_default_helper(uint8_t index) {
|
|||
rgblight_sethsv_at(rgblight_get_hue(), rgblight_get_sat(), rgblight_get_val(), index);
|
||||
}
|
||||
void rgblight_set_hsv_and_mode(uint8_t hue, uint8_t sat, uint8_t val, uint8_t mode) {
|
||||
if (val > RGBLIGHT_LIMIT_VAL) {
|
||||
val = RGBLIGHT_LIMIT_VAL;
|
||||
}
|
||||
rgblight_sethsv_noeeprom(hue, sat, val);
|
||||
// wait_us(175); // Add a slight delay between color and mode to ensure it's processed correctly
|
||||
rgblight_mode_noeeprom(mode);
|
||||
|
@ -48,6 +51,15 @@ uint32_t rgb_startup_animation(uint32_t triger_time, void *cb_arg) {
|
|||
}
|
||||
#endif
|
||||
|
||||
bool is_rgblight_startup_running(void) {
|
||||
#if defined(RGBLIGHT_STARTUP_ANIMATION)
|
||||
return is_rgblight_startup && is_keyboard_master();
|
||||
#else
|
||||
return false;
|
||||
#endif
|
||||
}
|
||||
|
||||
|
||||
void keyboard_post_init_rgb_light(void) {
|
||||
#if defined(RGBLIGHT_STARTUP_ANIMATION)
|
||||
is_enabled = rgblight_is_enabled();
|
||||
|
@ -121,3 +133,33 @@ layer_state_t default_layer_state_set_rgb_light(layer_state_t state) {
|
|||
}
|
||||
return state;
|
||||
}
|
||||
|
||||
#define _RGBM_SINGLE_STATIC(sym) \
|
||||
case RGBLIGHT_MODE_##sym: \
|
||||
return #sym;
|
||||
#define _RGBM_SINGLE_DYNAMIC(sym) \
|
||||
case RGBLIGHT_MODE_##sym: \
|
||||
return #sym;
|
||||
#define _RGBM_MULTI_STATIC(sym) \
|
||||
case RGBLIGHT_MODE_##sym: \
|
||||
return #sym;
|
||||
#define _RGBM_MULTI_DYNAMIC(sym) \
|
||||
case RGBLIGHT_MODE_##sym: \
|
||||
return #sym;
|
||||
#define _RGBM_TMP_STATIC(sym, msym) \
|
||||
case RGBLIGHT_MODE_##sym: \
|
||||
return #msym;
|
||||
#define _RGBM_TMP_DYNAMIC(sym, msym) \
|
||||
case RGBLIGHT_MODE_##sym: \
|
||||
return #msym;
|
||||
|
||||
|
||||
const char* rgblight_name(uint8_t effect) {
|
||||
switch (effect) {
|
||||
#include "rgblight_modes.h"
|
||||
case 0:
|
||||
return "Off";
|
||||
default:
|
||||
return "UNKNOWN";
|
||||
}
|
||||
}
|
||||
|
|
|
@ -10,3 +10,6 @@ void matrix_scan_rgb_light(void);
|
|||
layer_state_t layer_state_set_rgb_light(layer_state_t state);
|
||||
layer_state_t default_layer_state_set_rgb_light(layer_state_t state);
|
||||
void rgblight_sethsv_default_helper(uint8_t index);
|
||||
|
||||
const char* rgblight_name(uint8_t effect);
|
||||
bool is_rgblight_startup_running(void);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue