diff options
| author | Fred Silberberg <fred@silberberg.xyz> | 2019-05-29 07:44:43 -0700 |
|---|---|---|
| committer | MechMerlin <30334081+mechmerlin@users.noreply.github.com> | 2019-05-29 07:44:43 -0700 |
| commit | 287767bba10ac866fae2ffadd45b2315c1e184e6 (patch) | |
| tree | d61470be9593b60b06d9eda693e6cbaad6f52421 /users/333fred/333fred.c | |
| parent | 38d3b7aa45424f47797eae738c04a82377f198c9 (diff) | |
| download | qmk_firmware-287767bba10ac866fae2ffadd45b2315c1e184e6.tar.gz qmk_firmware-287767bba10ac866fae2ffadd45b2315c1e184e6.zip | |
Update 333fred keymaps and add new iris map. (#6010)
* Update 333fred keymaps and add new iris map.
* Fix iris key
Diffstat (limited to 'users/333fred/333fred.c')
| -rw-r--r-- | users/333fred/333fred.c | 38 |
1 files changed, 22 insertions, 16 deletions
diff --git a/users/333fred/333fred.c b/users/333fred/333fred.c index 3b2b36d02..79df8c4de 100644 --- a/users/333fred/333fred.c +++ b/users/333fred/333fred.c | |||
| @@ -86,31 +86,37 @@ qk_tap_dance_action_t tap_dance_actions[] = { | |||
| 86 | [TD_COPY_PASTE] = ACTION_TAP_DANCE_FN_ADVANCED(NULL, tap_dance_copy_paste_finished, NULL) | 86 | [TD_COPY_PASTE] = ACTION_TAP_DANCE_FN_ADVANCED(NULL, tap_dance_copy_paste_finished, NULL) |
| 87 | }; | 87 | }; |
| 88 | 88 | ||
| 89 | void tap_dance_process_record(uint16_t keycode) { | 89 | void tap_dance_process_keycode(uint16_t keycode) { |
| 90 | if (tap_dance_state == SINGLE_TAP && keycode != TD(TD_SYM_VIM)) { | 90 | if (tap_dance_state == SINGLE_TAP && keycode != TD(TD_SYM_VIM)) { |
| 91 | tap_dance_active = false; | 91 | tap_dance_active = false; |
| 92 | } | 92 | } |
| 93 | } | 93 | } |
| 94 | 94 | ||
| 95 | __attribute__ ((weak)) | 95 | __attribute__ ((weak)) |
| 96 | void matrix_init_rgb(void) {} | ||
| 97 | |||
| 98 | __attribute__ ((weak)) | ||
| 99 | void layer_state_set_rgb(uint32_t state) {} | 96 | void layer_state_set_rgb(uint32_t state) {} |
| 100 | 97 | ||
| 101 | __attribute__ ((weak)) | ||
| 102 | void matrix_scan_user_keyboard(void) {} | ||
| 103 | |||
| 104 | void matrix_scan_user() { | ||
| 105 | static bool first_run = true; | ||
| 106 | if (first_run) { | ||
| 107 | first_run = false; | ||
| 108 | matrix_init_rgb(); | ||
| 109 | } | ||
| 110 | matrix_scan_user_keyboard(); | ||
| 111 | } | ||
| 112 | |||
| 113 | uint32_t layer_state_set_user(uint32_t state) { | 98 | uint32_t layer_state_set_user(uint32_t state) { |
| 114 | layer_state_set_rgb(state); | 99 | layer_state_set_rgb(state); |
| 115 | return state; | 100 | return state; |
| 116 | } | 101 | } |
| 102 | |||
| 103 | bool try_handle_macro(uint16_t keycode, keyrecord_t *record) { | ||
| 104 | switch (keycode) | ||
| 105 | { | ||
| 106 | case DLEFT: | ||
| 107 | if (record->event.pressed) | ||
| 108 | SEND_STRING(SS_LGUI(SS_LALT(SS_TAP(X_LEFT)))); | ||
| 109 | return true; | ||
| 110 | case DRIGHT: | ||
| 111 | if (record->event.pressed) | ||
| 112 | SEND_STRING(SS_LGUI(SS_LALT(SS_TAP(X_RIGHT)))); | ||
| 113 | return true; | ||
| 114 | case PSCREEN_APP: | ||
| 115 | if (record->event.pressed) | ||
| 116 | SEND_STRING(SS_LALT(SS_TAP(X_PSCREEN))); | ||
| 117 | return true; | ||
| 118 | |||
| 119 | default: | ||
| 120 | return false; | ||
| 121 | } | ||
| 122 | } | ||
