aboutsummaryrefslogtreecommitdiffstats
path: root/quantum/process_keycode
diff options
context:
space:
mode:
authorJoe Wasson <joe@talljoe.com>2018-07-04 17:01:16 -0700
committerJack Humbert <jack.humb@gmail.com>2018-07-15 13:29:59 -0400
commit81756d7b219fc2c869c043ee606d491a1e77e1c1 (patch)
tree52946fef8d0105eba128e040f96025095907939b /quantum/process_keycode
parentc5c112ae2927d2d026de16cc4cdfd692bb6e7ab9 (diff)
downloadfirmware-81756d7b219fc2c869c043ee606d491a1e77e1c1.tar.gz
firmware-81756d7b219fc2c869c043ee606d491a1e77e1c1.tar.bz2
firmware-81756d7b219fc2c869c043ee606d491a1e77e1c1.zip
Fix tapdance when one-shot is disabled.
Diffstat (limited to 'quantum/process_keycode')
-rw-r--r--quantum/process_keycode/process_tap_dance.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/quantum/process_keycode/process_tap_dance.c b/quantum/process_keycode/process_tap_dance.c
index 94dd17c2f..833780691 100644
--- a/quantum/process_keycode/process_tap_dance.c
+++ b/quantum/process_keycode/process_tap_dance.c
@@ -16,7 +16,9 @@
#include "quantum.h"
#include "action_tapping.h"
+#ifndef NO_ACTION_ONESHOT
uint8_t get_oneshot_mods(void);
+#endif
static uint16_t last_td;
static int8_t highest_td = -1;
@@ -146,7 +148,11 @@ bool process_tap_dance(uint16_t keycode, keyrecord_t *record) {
action->state.keycode = keycode;
action->state.count++;
action->state.timer = timer_read();
+#ifndef NO_ACTION_ONESHOT
action->state.oneshot_mods = get_oneshot_mods();
+#else
+ action->state.oneshot_mods = 0;
+#endif
action->state.weak_mods = get_mods();
action->state.weak_mods |= get_weak_mods();
process_tap_dance_action_on_each_tap (action);