From 20c0533c4c66b9d222b6ced2fad3ec6be6cad76e Mon Sep 17 00:00:00 2001 From: XScorpion2 Date: Thu, 25 Jul 2019 13:56:29 -0500 Subject: [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 --- users/xulkal/process_records.c | 35 ++++++++++++++++++++++------------- 1 file changed, 22 insertions(+), 13 deletions(-) (limited to 'users/xulkal/process_records.c') 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; +} -- cgit v1.2.3