diff options
author | XScorpion2 <rcalt2vt@gmail.com> | 2019-07-25 13:56:29 -0500 |
---|---|---|
committer | Drashna Jaelre <drashna@live.com> | 2019-07-25 11:56:29 -0700 |
commit | 20c0533c4c66b9d222b6ced2fad3ec6be6cad76e (patch) | |
tree | 2cceb641e573cafeb6ee68f5083fb532ab80cd93 /users/xulkal/custom_tap_dance.c | |
parent | a747953dfae85d3bdfdfe205fc3d4ae6f8d1fe05 (diff) | |
download | qmk_firmware-20c0533c4c66b9d222b6ced2fad3ec6be6cad76e.tar.gz |
[User] Xulkal Keymaps Update (#6392)
* Xulkal changes
Refactor rgb & encoder menu
Hadron Keymap
Refactor oled menu
* Fixing horizontal OLED data display
* Reverting changes to take to separate prs
Diffstat (limited to 'users/xulkal/custom_tap_dance.c')
-rw-r--r-- | users/xulkal/custom_tap_dance.c | 16 |
1 files changed, 7 insertions, 9 deletions
diff --git a/users/xulkal/custom_tap_dance.c b/users/xulkal/custom_tap_dance.c index 7123f1be6..e0f90ea11 100644 --- a/users/xulkal/custom_tap_dance.c +++ b/users/xulkal/custom_tap_dance.c @@ -8,8 +8,7 @@ qk_tap_dance_action_t tap_dance_actions[] = { [COMM_QUOT] = ACTION_TAP_DANCE_DOUBLE(KC_COMM, KC_QUOT), [BACKSPACE] = ACTION_TAP_DANCE_DOUBLE (KC_BSPACE, LCTL(KC_BSPACE)), - [DELETE] = ACTION_TAP_DANCE_DOUBLE (KC_DELETE, LCTL(KC_DELETE)), - [DOT] = ACTION_TAP_DANCE_DOUBLE (KC_DOT, KC_GRAVE) + [DELETE] = ACTION_TAP_DANCE_DOUBLE (KC_DELETE, LCTL(KC_DELETE)) }; #else @@ -20,18 +19,17 @@ static uint16_t td_timer; const uint16_t PROGMEM td_keymaps[TD_MAX - TD_MIN][2] = { [TD_COMM - TD_MIN] = { KC_COMM, KC_QUOT }, [TD_BSPC - TD_MIN] = { KC_BSPACE, LCTL(KC_BSPACE) }, - [TD_DEL - TD_MIN] = { KC_DELETE, LCTL(KC_DELETE) }, - [TD_DOT - TD_MIN] = { KC_DOT, KC_GRAVE } + [TD_DEL - TD_MIN] = { KC_DELETE, LCTL(KC_DELETE) } }; -void run_tap_dance_double(uint8_t i) +static void run_custom_tap_dance(uint8_t i) { tap_code16(pgm_read_word(&td_keymaps[td_keycode - TD_MIN][i])); td_keycode = KC_TRANSPARENT; td_timer = timer_read() + TAPPING_TERM; } -bool process_tap_dance_double(uint16_t keycode, keyrecord_t *record) +bool process_custom_tap_dance(uint16_t keycode, keyrecord_t *record) { if (TD_MIN <= keycode && keycode < TD_MAX) { @@ -43,20 +41,20 @@ bool process_tap_dance_double(uint16_t keycode, keyrecord_t *record) td_timer = timer_read() + TAPPING_TERM; } else - run_tap_dance_double(1); + run_custom_tap_dance(1); } return false; } if (td_keycode != KC_TRANSPARENT) - run_tap_dance_double(0); + run_custom_tap_dance(0); return true; } void matrix_scan_user(void) { if (td_keycode != KC_TRANSPARENT && timer_expired(td_timer)) - run_tap_dance_double(0); + run_custom_tap_dance(0); } #endif |