diff options
author | Zach Burchill <burchill@users.noreply.github.com> | 2017-10-26 02:04:36 +0200 |
---|---|---|
committer | Jack Humbert <jack.humb@gmail.com> | 2017-10-31 05:40:27 +0100 |
commit | 4c1164c469a103981478222b21ef5ffaa364448d (patch) | |
tree | 708566fb3c66c5d92932570c89a68d1f1f09e728 /docs | |
parent | e555e42aae6dbed7ba0da78a3e05d25fc5da5214 (diff) | |
download | qmk_firmware-4c1164c469a103981478222b21ef5ffaa364448d.tar.gz qmk_firmware-4c1164c469a103981478222b21ef5ffaa364448d.tar.xz |
fixed two typos
I'm almost 100% sure "else if (state->count = 2) {" was a typo (it should have two ='s for a logical operator), and I'm *pretty* sure "if (state->interrupted || state->!pressed) return SINGLE_TAP;" has a typo. At least, it returns an error on my machine saying something about an unexpected '!'.
I changed it to a slightly longer form (i.e., "state->pressed==0"), and that worked fine.
Diffstat (limited to 'docs')
-rw-r--r-- | docs/feature_tap_dance.md | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/docs/feature_tap_dance.md b/docs/feature_tap_dance.md index 32dffa9cd..24cd2b440 100644 --- a/docs/feature_tap_dance.md +++ b/docs/feature_tap_dance.md @@ -200,12 +200,12 @@ typedef struct { int cur_dance (qk_tap_dance_state_t *state) { if (state->count == 1) { //If count = 1, and it has been interrupted - it doesn't matter if it is pressed or not: Send SINGLE_TAP - if (state->interrupted || state->!pressed) return SINGLE_TAP; + if (state->interrupted || state->pressed==0) return SINGLE_TAP; else return SINGLE_HOLD; } //If count = 2, and it has been interrupted - assume that user is trying to type the letter associated //with single tap. In example below, that means to send `xx` instead of `Escape`. - else if (state->count = 2) { + else if (state->count == 2) { if (state->interrupted) return DOUBLE_SINGLE_TAP; else if (state->pressed) return DOUBLE_HOLD; else return DOUBLE_TAP; |