diff options
| author | Drashna Jaelre <drashna@live.com> | 2018-11-05 21:38:18 -0800 |
|---|---|---|
| committer | Jack Humbert <jack.humb@gmail.com> | 2018-11-06 00:38:18 -0500 |
| commit | 6e44f94f21ef45865eb8820923d4c9c696f08133 (patch) | |
| tree | d1a0514c9d6205834eb66fa2c91ae4dd361b42f9 /quantum | |
| parent | f2101cfb6a2270345fe6235d4c36e2e0d49db528 (diff) | |
| download | qmk_firmware-6e44f94f21ef45865eb8820923d4c9c696f08133.tar.gz qmk_firmware-6e44f94f21ef45865eb8820923d4c9c696f08133.zip | |
Add EEPROM_RESET keycode to core code (#4234)
* Add EEPROM Reset keycode
* Add keycode to docs
* Move EEPROM Reset code to the end of the enum
* Cleanup and naming change
Diffstat (limited to 'quantum')
| -rw-r--r-- | quantum/quantum.c | 5 | ||||
| -rw-r--r-- | quantum/quantum_keycodes.h | 4 |
2 files changed, 9 insertions, 0 deletions
diff --git a/quantum/quantum.c b/quantum/quantum.c index 5f1a691c8..69692233e 100644 --- a/quantum/quantum.c +++ b/quantum/quantum.c | |||
| @@ -298,6 +298,11 @@ bool process_record_quantum(keyrecord_t *record) { | |||
| 298 | print("DEBUG: enabled.\n"); | 298 | print("DEBUG: enabled.\n"); |
| 299 | } | 299 | } |
| 300 | return false; | 300 | return false; |
| 301 | case EEPROM_RESET: | ||
| 302 | if (record->event.pressed) { | ||
| 303 | eeconfig_init(); | ||
| 304 | } | ||
| 305 | return false; | ||
| 301 | #ifdef FAUXCLICKY_ENABLE | 306 | #ifdef FAUXCLICKY_ENABLE |
| 302 | case FC_TOG: | 307 | case FC_TOG: |
| 303 | if (record->event.pressed) { | 308 | if (record->event.pressed) { |
diff --git a/quantum/quantum_keycodes.h b/quantum/quantum_keycodes.h index 53fece21c..14f8c2b81 100644 --- a/quantum/quantum_keycodes.h +++ b/quantum/quantum_keycodes.h | |||
| @@ -454,6 +454,8 @@ enum quantum_keycodes { | |||
| 454 | TERM_OFF, | 454 | TERM_OFF, |
| 455 | #endif | 455 | #endif |
| 456 | 456 | ||
| 457 | EEPROM_RESET, | ||
| 458 | |||
| 457 | // always leave at the end | 459 | // always leave at the end |
| 458 | SAFE_RANGE | 460 | SAFE_RANGE |
| 459 | }; | 461 | }; |
| @@ -569,6 +571,8 @@ enum quantum_keycodes { | |||
| 569 | 571 | ||
| 570 | #define KC_GESC GRAVE_ESC | 572 | #define KC_GESC GRAVE_ESC |
| 571 | 573 | ||
| 574 | #define EEP_RST EEPROM_RESET | ||
| 575 | |||
| 572 | #define CK_TOGG CLICKY_TOGGLE | 576 | #define CK_TOGG CLICKY_TOGGLE |
| 573 | #define CK_RST CLICKY_RESET | 577 | #define CK_RST CLICKY_RESET |
| 574 | #define CK_UP CLICKY_UP | 578 | #define CK_UP CLICKY_UP |
