Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add QMK Tap Dance to ESC/Backtick key #8

Merged
merged 7 commits into from Aug 14, 2021
Merged

Conversation

salcode
Copy link
Owner

@salcode salcode commented Aug 14, 2021

Add QMK Tap Dance Feature to ESC/Backtick key, so the behavior when hitting the key varies based on the number of times it is hit in rapid succession:

  • Once: `
  • Twice: <Esc>
  • Three times: ```
  • Four times: ````
  • etc.

Resolves #5

Move position of backtick (KC_GRC) / ESC key in keyboard layout.

This is exclusively a whitespace change in preparation for replacing
KC_GRV with a tap dance command

See #5
This value will be used to identify the specific action in the
tap_dance_actions array.

Note: The tap_dance_actions array is separate from the PROGMEM_keymaps
array so this needs to be a new enum set (we can not add this value to
our already existing "alt_keycodes")

See #5
Define td_backtick_exactly_2_esc() function, which checks the "count"
value of the tap dance state (once the repeated tapping has stopped) and
based on that count take one of two actions:

- if the "count" is exactly 2, tap the ESC key
- for any other "count", tap the backtick (KC_GRV) key "count" number of
  times (e.g. if count is 3, tap the backtick 3 times)

See #5
Add the TD_BACKTICK_ESC value we defined to the tap_dance_actions array
and associate it with the td_backtick_exactly_2_esc() function we
defined.

See #5
Map the ESC key to our tap dance value we defined (TD_BACKTICK_ESC),
which is associated with the function td_backtick_exactly_2_esc() in the
tap_dance_actions array.

At this point, we have the following behavior when pressing the ESC key
a given number of times:

- Once: "`"
- Twice: <Esc>
- Three times: "```"
- Four times: "````"
- etc.

See #5
@salcode salcode merged commit 6b05661 into main Aug 14, 2021
@salcode salcode deleted the feat/tap-dance-esc-5 branch August 14, 2021 23:26
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Add QMK Tap Dance Feature to ESC/Backtick key
1 participant