diff options
author | Joe Wasson <jwasson+github@gmail.com> | 2018-05-12 09:54:35 -0700 |
---|---|---|
committer | Drashna Jaelre <drashna@live.com> | 2018-05-12 09:54:35 -0700 |
commit | 6dda0d6e34ac47c6dfdee1429937b445bf941425 (patch) | |
tree | e74a9e09830312df42d60858ae2673ec638f81c2 /users/talljoe/tapdance.c | |
parent | 48a68dcf107314d81fbade38d3969caaa31b5671 (diff) | |
download | qmk_firmware-6dda0d6e34ac47c6dfdee1429937b445bf941425.tar.gz |
More work on Talljoe layout including adding layout support for HHKB and TKL. (#2946)
* Add tap-dancing semicolon.
* Infinity60 was running out of USB space.
* Rename common layout variable so it doesn't collide with some keyboards.
* Godspeed!!!
* Patch the number of LEDs for 1up60rgb
* Don't light up if rgblight is off.
* Add HHKB layout.
* Add HHKB to Talljoe's layout.
* Bring back bananasplit keymap.
* info.json
* Userspace config.h doesn't seem to be setting PREVENT_STUCK_MODIFIERS
* Remove 1uprgb workaround
* Add TKL to talljoe keymap.
Also introduces the tkl layout.
Diffstat (limited to 'users/talljoe/tapdance.c')
-rw-r--r-- | users/talljoe/tapdance.c | 34 |
1 files changed, 34 insertions, 0 deletions
diff --git a/users/talljoe/tapdance.c b/users/talljoe/tapdance.c new file mode 100644 index 000000000..3198fc67f --- /dev/null +++ b/users/talljoe/tapdance.c @@ -0,0 +1,34 @@ +//Tap Dance +#include "talljoe.h" + +// Send semin-colon + enter on two taps +void tap_dance_semicolon(qk_tap_dance_state_t *state, void *user_data) { + switch(state->count) { + case 1: + register_code(KC_SCLN); + unregister_code(KC_SCLN); + break; + case 2: + register_code(KC_SCLN); + unregister_code(KC_SCLN); + + uint8_t mods = get_mods(); + if (mods) { + clear_mods(); + } + + register_code(KC_ENT); + unregister_code(KC_ENT); + + if (mods) { + set_mods(mods); + } + + reset_tap_dance(state); + break; + } +} + +qk_tap_dance_action_t tap_dance_actions[] = { + [TD_SEMICOLON] = ACTION_TAP_DANCE_FN(tap_dance_semicolon), +}; |