Minor cleanup

This commit is contained in:
2022-07-21 17:49:35 -07:00
parent 4cb3fe0ee9
commit e6cc6bfa10
11 changed files with 141 additions and 114 deletions

View File

@ -7,6 +7,9 @@
#define LEADER_TIMEOUT 250
// Enable spellcheck over HID
#define BETA_ENABLE_SPELLCHECK
// RGBLight effects
// Static color is always enabled.
//#define RGBLIGHT_EFFECT_ALTERNATING
@ -20,5 +23,7 @@
//#define RGBLIGHT_EFFECT_STATIC_GRADIENT
//#define RGBLIGHT_EFFECT_TWINKLE
// Special effects
//#define RGB_MATRIX_FRAMEBUFFER_EFFECTS
// Custom effects
#define RGB_MATRIX_FRAMEBUFFER_EFFECTS
#define ENABLE_RGB_MATRIX_FFT_ANIM // Requires framebuffer

View File

@ -1,7 +1,10 @@
#include "keymap.h"
#include "layers/layers.h"
#ifdef BETA_ENABLE_SPELLCHECK
#include "features/spellcheck.h"
#endif
#include "features/beta_rawhid.h"
// Values that should not be saved to git.
@ -37,20 +40,13 @@ void matrix_scan_user(void) {
}
}
uint32_t layer_state_set_user(uint32_t state) {
set_layer_colors(state);
//uint8_t layer = biton32(state);
return state;
};
// Return FALSE to halt key processing,
// Return TRUE to allow QMK to handle keypress.
bool process_record_user(uint16_t keycode, keyrecord_t *record) {
#ifdef BETA_ENABLE_SPELLCHECK
if (!process_spellcheck(keycode, record)) { return false; }
#endif
// Handle macros
switch (keycode) {

View File

@ -49,7 +49,7 @@ void set_layer_color(int layer) {
void rgb_matrix_indicators_user(void) {
void set_layer_matrix_indicator(void) {
if (keyboard_config.disable_layer_led) {
return;
}
@ -78,8 +78,7 @@ void rgb_matrix_indicators_user(void) {
uint32_t set_layer_colors(uint32_t state) {
uint32_t layer_state_set_user(uint32_t state) {
uint8_t layer = biton32(state);
ergodox_board_led_off();

View File

@ -35,7 +35,7 @@ enum led_indices {
extern uint8_t layer_layouts[];
void set_layer_color(int layer);
void rgb_matrix_indicators_user(void);
uint32_t set_layer_colors(uint32_t state);
void set_layer_color(int layer); // Helper method
void rgb_matrix_indicators_user(void); // QMK method
uint32_t layer_state_set_user(uint32_t state); // QMK method