diff options
author | Ismael Venegas Castelló <ismael.vc1337@gmail.com> | 2018-12-20 01:49:56 +0100 |
---|---|---|
committer | Drashna Jaelre <drashna@live.com> | 2018-12-20 01:49:56 +0100 |
commit | 5eb8f3f6b51cecc067aaedfb8b2f08cb626381bb (patch) | |
tree | b9e1b89d43ec3be60d03daa052556f90a7190dd6 /keyboards/ergodox_ez/keymaps/hacker_dvorak/tap_dance/mod_tap_layer_dances | |
parent | b13162f7fd5a4c09dff15ff6f9713526622925a7 (diff) | |
download | qmk_firmware-5eb8f3f6b51cecc067aaedfb8b2f08cb626381bb.tar.gz qmk_firmware-5eb8f3f6b51cecc067aaedfb8b2f08cb626381bb.tar.xz |
Keymap: Refactor Hacker Dvorak (#4688)
Programmer Dvorak based layout for the Ergodox EZ.
Diffstat (limited to 'keyboards/ergodox_ez/keymaps/hacker_dvorak/tap_dance/mod_tap_layer_dances')
-rw-r--r-- | keyboards/ergodox_ez/keymaps/hacker_dvorak/tap_dance/mod_tap_layer_dances/none_lead.c | 40 |
1 files changed, 40 insertions, 0 deletions
diff --git a/keyboards/ergodox_ez/keymaps/hacker_dvorak/tap_dance/mod_tap_layer_dances/none_lead.c b/keyboards/ergodox_ez/keymaps/hacker_dvorak/tap_dance/mod_tap_layer_dances/none_lead.c new file mode 100644 index 000000000..6debc1ce4 --- /dev/null +++ b/keyboards/ergodox_ez/keymaps/hacker_dvorak/tap_dance/mod_tap_layer_dances/none_lead.c @@ -0,0 +1,40 @@ +//instanalize an instance of 'tap' for the None - Lead tap dance. +static tap none_lead_state = { + .is_press_action = true, + .state = 0 +}; + +void none_lead_finished(qk_tap_dance_state_t *state, void *user_data) { + none_lead_state.state = current_dance(state); + switch (none_lead_state.state) { + case SINGLE_TAP: + register_code(KC_NO); + break; + + case SINGLE_HOLD: + register_code(KC_LALT); + register_code(KC_LSFT); + break; + + case DOUBLE_TAP: + qk_leader_start(); + break; + } +} + +void none_lead_reset(qk_tap_dance_state_t *state, void *user_data) { + switch (none_lead_state.state) { + case SINGLE_TAP: + unregister_code(KC_NO); + break; + + case SINGLE_HOLD: + unregister_code(KC_LALT); + unregister_code(KC_LSFT); + break; + + case DOUBLE_TAP: + break; + } + none_lead_state.state = 0; +} |