diff options
| author | XScorpion2 <rcalt2vt@gmail.com> | 2019-07-25 13:56:29 -0500 |
|---|---|---|
| committer | Drashna Jaelre <drashna@live.com> | 2019-07-25 11:56:29 -0700 |
| commit | 20c0533c4c66b9d222b6ced2fad3ec6be6cad76e (patch) | |
| tree | 2cceb641e573cafeb6ee68f5083fb532ab80cd93 /users/xulkal/process_records.c | |
| parent | a747953dfae85d3bdfdfe205fc3d4ae6f8d1fe05 (diff) | |
| download | qmk_firmware-20c0533c4c66b9d222b6ced2fad3ec6be6cad76e.tar.gz qmk_firmware-20c0533c4c66b9d222b6ced2fad3ec6be6cad76e.zip | |
[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.c | 35 |
1 files changed, 22 insertions, 13 deletions
diff --git a/users/xulkal/process_records.c b/users/xulkal/process_records.c index 2c5d2a4e7..245d4955f 100644 --- a/users/xulkal/process_records.c +++ b/users/xulkal/process_records.c | |||
| @@ -2,6 +2,10 @@ | |||
| 2 | #include "custom_keycodes.h" | 2 | #include "custom_keycodes.h" |
| 3 | #include "timer_utils.h" | 3 | #include "timer_utils.h" |
| 4 | 4 | ||
| 5 | #ifdef RGB_ENABLE | ||
| 6 | #include "custom_rgb.h" | ||
| 7 | #endif | ||
| 8 | |||
| 5 | #ifdef TRILAYER_ENABLED | 9 | #ifdef TRILAYER_ENABLED |
| 6 | uint32_t layer_state_set_user(uint32_t state) | 10 | uint32_t layer_state_set_user(uint32_t state) |
| 7 | { | 11 | { |
| @@ -14,25 +18,17 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) | |||
| 14 | static uint16_t reset_timer; | 18 | static uint16_t reset_timer; |
| 15 | 19 | ||
| 16 | #ifndef TAP_DANCE_ENABLE | 20 | #ifndef TAP_DANCE_ENABLE |
| 17 | if (!process_tap_dance_double(keycode, record)) | 21 | if (!process_custom_tap_dance(keycode, record)) |
| 18 | return false; | 22 | return false; |
| 19 | #endif | 23 | #endif |
| 20 | 24 | ||
| 21 | switch (keycode) | 25 | switch (keycode) |
| 22 | { | 26 | { |
| 23 | case RGBRST: | 27 | case RGBRST: |
| 24 | { | 28 | #ifdef RGB_ENABLE |
| 25 | #if defined(RGBLIGHT_ENABLE) | 29 | if (record->event.pressed) |
| 26 | if (record->event.pressed) | 30 | rgb_reset(); |
| 27 | { | ||
| 28 | eeconfig_update_rgblight_default(); | ||
| 29 | rgblight_enable(); | ||
| 30 | } | ||
| 31 | #elif defined(RGB_MATRIX_ENABLE) | ||
| 32 | if (record->event.pressed) | ||
| 33 | eeconfig_update_rgb_matrix_default(); | ||
| 34 | #endif | 31 | #endif |
| 35 | } | ||
| 36 | return false; | 32 | return false; |
| 37 | case RESET: | 33 | case RESET: |
| 38 | { | 34 | { |
| @@ -42,9 +38,16 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) | |||
| 42 | reset_keyboard(); | 38 | reset_keyboard(); |
| 43 | } | 39 | } |
| 44 | return false; | 40 | return false; |
| 41 | #ifdef RGB_MATRIX_TOG_LAYERS | ||
| 42 | case RGB_TOG: | ||
| 43 | if (record->event.pressed) { | ||
| 44 | rgb_matrix_decrease_flags(); | ||
| 45 | } | ||
| 46 | return false; | ||
| 47 | #endif | ||
| 45 | } | 48 | } |
| 46 | 49 | ||
| 47 | return process_record_keymap(keycode, record); | 50 | return process_record_encoder(keycode, record) && process_record_keymap(keycode, record); |
| 48 | } | 51 | } |
| 49 | 52 | ||
| 50 | __attribute__ ((weak)) | 53 | __attribute__ ((weak)) |
| @@ -52,3 +55,9 @@ bool process_record_keymap(uint16_t keycode, keyrecord_t *record) | |||
| 52 | { | 55 | { |
| 53 | return true; | 56 | return true; |
| 54 | } | 57 | } |
| 58 | |||
| 59 | __attribute__ ((weak)) | ||
| 60 | bool process_record_encoder(uint16_t keycode, keyrecord_t *record) | ||
| 61 | { | ||
| 62 | return true; | ||
| 63 | } | ||
