summaryrefslogtreecommitdiffstats
path: root/keyboards/ergodox_ez
diff options
context:
space:
mode:
authorAlex Mayer <amayer5125@gmail.com>2018-11-27 23:04:29 +0100
committerAlex Mayer <amayer5125@gmail.com>2018-11-27 23:19:15 +0100
commit6983c71efd9991e7f6b8290dff24a023bbe4eeb1 (patch)
tree56953b503d8e6ed83c33a3de3e9183408f32d167 /keyboards/ergodox_ez
parent929e6a3231d7b873bad475a7040f140712fb9c9d (diff)
downloadqmk_firmware-6983c71efd9991e7f6b8290dff24a023bbe4eeb1.tar.gz
qmk_firmware-6983c71efd9991e7f6b8290dff24a023bbe4eeb1.tar.xz
Ergodox EZ: Clean Up process_record_user Function
Set ERPM = SAFE_RANGE
Diffstat (limited to 'keyboards/ergodox_ez')
-rw-r--r--keyboards/ergodox_ez/keymaps/default/keymap.c35
1 files changed, 13 insertions, 22 deletions
diff --git a/keyboards/ergodox_ez/keymaps/default/keymap.c b/keyboards/ergodox_ez/keymaps/default/keymap.c
index 0cd6d6c2c..12d6cf6fa 100644
--- a/keyboards/ergodox_ez/keymaps/default/keymap.c
+++ b/keyboards/ergodox_ez/keymaps/default/keymap.c
@@ -6,8 +6,7 @@
#define MDIA 2 // media keys
enum custom_keycodes {
- PLACEHOLDER = SAFE_RANGE, // can always be here
- EPRM,
+ EPRM = SAFE_RANGE,
VRSN,
RGB_SLD
};
@@ -146,28 +145,20 @@ const uint16_t PROGMEM fn_actions[] = {
};
bool process_record_user(uint16_t keycode, keyrecord_t *record) {
- switch (keycode) {
- // dynamically generate these.
- case EPRM:
- if (record->event.pressed) {
+ if (record->event.pressed) {
+ switch (keycode) {
+ case EPRM:
eeconfig_init();
- }
- return false;
- break;
- case VRSN:
- if (record->event.pressed) {
+ return false;
+ case VRSN:
SEND_STRING (QMK_KEYBOARD "/" QMK_KEYMAP " @ " QMK_VERSION);
- }
- return false;
- break;
- case RGB_SLD:
- if (record->event.pressed) {
- #ifdef RGBLIGHT_ENABLE
- rgblight_mode(1);
- #endif
- }
- return false;
- break;
+ return false;
+ #ifdef RGBLIGHT_ENABLE
+ case RGB_SLD:
+ rgblight_mode(1);
+ return false;
+ #endif
+ }
}
return true;
}