summaryrefslogtreecommitdiffstats
path: root/users/xulkal/process_records.c
diff options
context:
space:
mode:
authorXScorpion2 <rcalt2vt@gmail.com>2019-07-25 13:56:29 -0500
committerDrashna Jaelre <drashna@live.com>2019-07-25 11:56:29 -0700
commit20c0533c4c66b9d222b6ced2fad3ec6be6cad76e (patch)
tree2cceb641e573cafeb6ee68f5083fb532ab80cd93 /users/xulkal/process_records.c
parenta747953dfae85d3bdfdfe205fc3d4ae6f8d1fe05 (diff)
[User] Xulkal Keymaps Update (#6392)
* Xulkal changes Refactor rgb & encoder menu Hadron Keymap Refactor oled menu * Fixing horizontal OLED data display * Reverting changes to take to separate prs
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;
+}