1
0
Fork 0

[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
This commit is contained in:
XScorpion2 2019-07-25 13:56:29 -05:00 committed by Drashna Jaelre
parent a747953dfa
commit 20c0533c4c
20 changed files with 460 additions and 158 deletions

View file

@ -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;
}