summaryrefslogtreecommitdiffstats
path: root/users/xulkal/process_records.c
diff options
context:
space:
mode:
Diffstat (limited to 'users/xulkal/process_records.c')
-rw-r--r--users/xulkal/process_records.c15
1 files changed, 10 insertions, 5 deletions
diff --git a/users/xulkal/process_records.c b/users/xulkal/process_records.c
index 531f99eb06..7c2b5e133f 100644
--- a/users/xulkal/process_records.c
+++ b/users/xulkal/process_records.c
@@ -16,13 +16,13 @@ extern void eeconfig_update_rgb_matrix_default(void);
#endif
bool process_record_user(uint16_t keycode, keyrecord_t *record) {
+ static uint16_t reset_timer;
switch (keycode) {
case QWERTY:
if (record->event.pressed) {
set_single_persistent_default_layer(_QWERTY);
}
return false;
- break;
case GAME:
#ifndef GAMELAYER_DISABLE
if (record->event.pressed) {
@@ -30,7 +30,6 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) {
}
#endif
return false;
- break;
case LOWER:
if (record->event.pressed) {
layer_on(_LOWER);
@@ -44,7 +43,6 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) {
#endif
}
return false;
- break;
case RAISE:
if (record->event.pressed) {
layer_on(_RAISE);
@@ -58,7 +56,6 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) {
#endif
}
return false;
- break;
case RGBRST:
#if defined(RGBLIGHT_ENABLE)
if (record->event.pressed) {
@@ -71,7 +68,15 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) {
}
#endif
return false;
- break;
+ case RESET:
+ if (record->event.pressed) {
+ reset_timer = timer_read();
+ } else {
+ if (timer_elapsed(reset_timer) >= 500) {
+ reset_keyboard();
+ }
+ }
+ return false;
}
return process_record_keymap(keycode, record) &&