summaryrefslogtreecommitdiff
path: root/users/xulkal/process_records.c
diff options
context:
space:
mode:
Diffstat (limited to 'users/xulkal/process_records.c')
-rw-r--r--users/xulkal/process_records.c35
1 files changed, 22 insertions, 13 deletions
diff --git a/users/xulkal/process_records.c b/users/xulkal/process_records.c
index 2c5d2a4e75..245d4955fb 100644
--- a/users/xulkal/process_records.c
+++ b/users/xulkal/process_records.c
@@ -2,6 +2,10 @@
#include "custom_keycodes.h"
#include "timer_utils.h"
+#ifdef RGB_ENABLE
+#include "custom_rgb.h"
+#endif
+
#ifdef TRILAYER_ENABLED
uint32_t layer_state_set_user(uint32_t state)
{
@@ -14,25 +18,17 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record)
static uint16_t reset_timer;
#ifndef TAP_DANCE_ENABLE
- if (!process_tap_dance_double(keycode, record))
+ if (!process_custom_tap_dance(keycode, record))
return false;
#endif
switch (keycode)
{
case RGBRST:
- {
-#if defined(RGBLIGHT_ENABLE)
- if (record->event.pressed)
- {
- eeconfig_update_rgblight_default();
- rgblight_enable();
- }
-#elif defined(RGB_MATRIX_ENABLE)
- if (record->event.pressed)
- eeconfig_update_rgb_matrix_default();
+#ifdef RGB_ENABLE
+ if (record->event.pressed)
+ rgb_reset();
#endif
- }
return false;
case RESET:
{
@@ -42,9 +38,16 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record)
reset_keyboard();
}
return false;
+#ifdef RGB_MATRIX_TOG_LAYERS
+ case RGB_TOG:
+ if (record->event.pressed) {
+ rgb_matrix_decrease_flags();
+ }
+ return false;
+#endif
}
- return process_record_keymap(keycode, record);
+ return process_record_encoder(keycode, record) && process_record_keymap(keycode, record);
}
__attribute__ ((weak))
@@ -52,3 +55,9 @@ bool process_record_keymap(uint16_t keycode, keyrecord_t *record)
{
return true;
}
+
+__attribute__ ((weak))
+bool process_record_encoder(uint16_t keycode, keyrecord_t *record)
+{
+ return true;
+}