mirror of
https://github.com/qmk/qmk_firmware
synced 2024-11-16 08:56:11 +00:00
7b5fa4b13e
* Add userspace for @kageurufu * Remove custom keycodes for layer keys Add some common defaults for my rules.mk
44 lines
1,014 B
C
44 lines
1,014 B
C
#include "kageurufu.h"
|
|
|
|
bool process_record_user(uint16_t keycode, keyrecord_t *record) {
|
|
switch (keycode) {
|
|
case QWERTY:
|
|
if (record->event.pressed) {
|
|
set_single_persistent_default_layer(_QWERTY);
|
|
}
|
|
return false;
|
|
break;
|
|
case COLEMAK:
|
|
if(record->event.pressed) {
|
|
set_single_persistent_default_layer(_COLEMAK);
|
|
}
|
|
return false;
|
|
break;
|
|
case RGBRST:
|
|
#ifdef RGBLIGHT_ENABLE
|
|
if (record->event.pressed) {
|
|
eeconfig_update_rgblight_default();
|
|
rgblight_enable();
|
|
}
|
|
#endif
|
|
break;
|
|
}
|
|
|
|
|
|
return process_record_keymap(keycode, record) &&
|
|
#if defined(RGBLIGHT_ENABLE) || defined(RGB_MATRIX_ENABLE)
|
|
process_record_rgb(keycode, record) &&
|
|
#endif // RGBLIGHT_ENABLE;
|
|
true;
|
|
}
|
|
|
|
__attribute__ ((weak))
|
|
bool process_record_keymap(uint16_t keycode, keyrecord_t *record) {
|
|
return true;
|
|
}
|
|
|
|
|
|
__attribute__ ((weak))
|
|
bool process_record_rgb(uint16_t keycode, keyrecord_t *record) {
|
|
return true;
|
|
}
|