Ergodox EZ: Clean Up process_record_user Function

Set ERPM = SAFE_RANGE
master
Alex Mayer 2018-11-27 17:04:29 -05:00
parent 929e6a3231
commit 6983c71efd
1 changed files with 13 additions and 22 deletions

View File

@ -6,8 +6,7 @@
#define MDIA 2 // media keys #define MDIA 2 // media keys
enum custom_keycodes { enum custom_keycodes {
PLACEHOLDER = SAFE_RANGE, // can always be here EPRM = SAFE_RANGE,
EPRM,
VRSN, VRSN,
RGB_SLD RGB_SLD
}; };
@ -146,28 +145,20 @@ const uint16_t PROGMEM fn_actions[] = {
}; };
bool process_record_user(uint16_t keycode, keyrecord_t *record) { bool process_record_user(uint16_t keycode, keyrecord_t *record) {
switch (keycode) { if (record->event.pressed) {
// dynamically generate these. switch (keycode) {
case EPRM: case EPRM:
if (record->event.pressed) {
eeconfig_init(); eeconfig_init();
} return false;
return false; case VRSN:
break;
case VRSN:
if (record->event.pressed) {
SEND_STRING (QMK_KEYBOARD "/" QMK_KEYMAP " @ " QMK_VERSION); SEND_STRING (QMK_KEYBOARD "/" QMK_KEYMAP " @ " QMK_VERSION);
} return false;
return false; #ifdef RGBLIGHT_ENABLE
break; case RGB_SLD:
case RGB_SLD: rgblight_mode(1);
if (record->event.pressed) { return false;
#ifdef RGBLIGHT_ENABLE #endif
rgblight_mode(1); }
#endif
}
return false;
break;
} }
return true; return true;
} }