diff options
author | fauxpark <fauxpark@gmail.com> | 2019-07-16 16:04:02 +1000 |
---|---|---|
committer | skullydazed <skullydazed@users.noreply.github.com> | 2019-07-15 23:04:02 -0700 |
commit | f14629ed1cd7c7ec9089604d64f29a99981558e8 (patch) | |
tree | a3691f4f3cb0c941694c16a3a94f73befb6ef6ec /keyboards/handwired/traveller/keymaps/default | |
parent | 2a231457bd494079c36cf3e07c9b887016adb491 (diff) | |
download | qmk_firmware-f14629ed1cd7c7ec9089604d64f29a99981558e8.tar.gz qmk_firmware-f14629ed1cd7c7ec9089604d64f29a99981558e8.zip |
Remove/migrate action_get_macro()s from default keymaps (#5625)
* Remove/migrate action_get_macro()s from default keymaps
* Leave these breaks alone
Diffstat (limited to 'keyboards/handwired/traveller/keymaps/default')
-rw-r--r-- | keyboards/handwired/traveller/keymaps/default/keymap.c | 60 |
1 files changed, 21 insertions, 39 deletions
diff --git a/keyboards/handwired/traveller/keymaps/default/keymap.c b/keyboards/handwired/traveller/keymaps/default/keymap.c index 44f65f4b81..4802b05345 100644 --- a/keyboards/handwired/traveller/keymaps/default/keymap.c +++ b/keyboards/handwired/traveller/keymaps/default/keymap.c @@ -15,13 +15,13 @@ #define RGBLED_TOGGLE 10 #define _HIOUT 15 #define _LWOUT 16 -// Macros -#define MDL 4 -#define MDR 5 -#define MUR 6 -#define MUL 3 - +enum custom_keycodes { + M_MUL = SAFE_RANGE, + M_MDL, + M_MDR, + M_MUR +}; const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { /* Qwerty @@ -102,9 +102,9 @@ Right hand nav keys work pretty well chorded with the Right hand Hi Key */ [_NAV] = KEYMAP( - TG(_NAV), KC_NO, KC_NO, KC_UP, KC_NO, RGUI(KC_RIGHT), KC_WH_U, M(MUL), KC_MS_U, M(MUR), KC_NO, KC_ACL2, + TG(_NAV), KC_NO, KC_NO, KC_UP, KC_NO, RGUI(KC_RIGHT), KC_WH_U, M_MUL, KC_MS_U, M_MUR, KC_NO, KC_ACL2, KC_TRNS, RGUI(KC_LEFT), KC_LEFT, KC_DOWN, KC_RIGHT, LCTL(KC_E), KC_BTN3, KC_MS_L, KC_MS_U, KC_MS_R, KC_NO, KC_ACL1, - KC_TRNS, LCTL(KC_A), LGUI(KC_X),RGUI(KC_C), RGUI(KC_V),KC_NO, KC_ENTER, KC_WH_D, M(MDL), KC_MS_D, M(MDR), KC_UP, KC_ACL0, + KC_TRNS, LCTL(KC_A), LGUI(KC_X),RGUI(KC_C), RGUI(KC_V),KC_NO, KC_ENTER, KC_WH_D, M_MDL, KC_MS_D, M_MDR, KC_UP, KC_ACL0, KC_TRNS, RGUI(KC_Z), KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_BTN2, KC_BTN1, KC_TRNS, KC_TRNS, KC_LEFT, KC_DOWN, KC_RIGHT ), @@ -152,23 +152,10 @@ Right hand nav keys work pretty well chorded with the Right hand Hi Key }; -const macro_t *action_get_macro(keyrecord_t *record, uint8_t id, uint8_t opt) -{ - // MACRODOWN only works in this function - switch(id) { - case 0: - if (record->event.pressed) { - register_code(KC_RSFT); - #ifdef BACKLIGHT_ENABLE - backlight_step(); - #endif - } else { - unregister_code(KC_RSFT); - } - break; - +bool process_record_user(uint16_t keycode, keyrecord_t *record) { + switch (keycode) { // from algernon's ErgoDox EZ layout, - case MUL: + case M_MUL: if (record->event.pressed) { mousekey_on(KC_MS_UP); mousekey_on(KC_MS_LEFT); @@ -177,9 +164,9 @@ const macro_t *action_get_macro(keyrecord_t *record, uint8_t id, uint8_t opt) mousekey_off(KC_MS_LEFT); } mousekey_send(); - break; + return false; - case MUR: + case M_MUR: if (record->event.pressed) { mousekey_on(KC_MS_UP); mousekey_on(KC_MS_RIGHT); @@ -188,9 +175,9 @@ const macro_t *action_get_macro(keyrecord_t *record, uint8_t id, uint8_t opt) mousekey_off(KC_MS_RIGHT); } mousekey_send(); - break; + return false; - case MDL: + case M_MDL: if (record->event.pressed) { mousekey_on(KC_MS_DOWN); mousekey_on(KC_MS_LEFT); @@ -199,9 +186,9 @@ const macro_t *action_get_macro(keyrecord_t *record, uint8_t id, uint8_t opt) mousekey_off(KC_MS_LEFT); } mousekey_send(); - break; + return false; - case MDR: + case M_MDR: if (record->event.pressed) { mousekey_on(KC_MS_DOWN); mousekey_on(KC_MS_RIGHT); @@ -210,11 +197,11 @@ const macro_t *action_get_macro(keyrecord_t *record, uint8_t id, uint8_t opt) mousekey_off(KC_MS_RIGHT); } mousekey_send(); - break; - - + return false; + default: + return true; } - return MACRO_NONE; + return true; }; void LayerLEDSet(uint8_t layr) { @@ -262,11 +249,6 @@ void matrix_scan_user(void) { } } - -bool process_record_user(uint16_t keycode, keyrecord_t *record) { - return true; -} - void led_set_user(uint8_t usb_led) { } |