summaryrefslogtreecommitdiffstats
path: root/quantum/quantum.c
diff options
context:
space:
mode:
authorSergey Vlasov <sigprof@gmail.com>2022-10-03 12:48:16 +0300
committerGitHub <noreply@github.com>2022-10-03 20:48:16 +1100
commitca0c12847a97a62f887fd4625673395104a7257b (patch)
tree5948722aba72b72e549232950f38a35500638262 /quantum/quantum.c
parent0e6f1914367c59ced83c45ff4212fcc489918936 (diff)
Fix layer switching from tap dances by redoing the keymap lookup (#17935)
Diffstat (limited to 'quantum/quantum.c')
-rw-r--r--quantum/quantum.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/quantum/quantum.c b/quantum/quantum.c
index ff36e14775..5b5364c8f1 100644
--- a/quantum/quantum.c
+++ b/quantum/quantum.c
@@ -251,7 +251,11 @@ bool process_record_quantum(keyrecord_t *record) {
#endif
#ifdef TAP_DANCE_ENABLE
- preprocess_tap_dance(keycode, record);
+ if (preprocess_tap_dance(keycode, record)) {
+ // The tap dance might have updated the layer state, therefore the
+ // result of the keycode lookup might change.
+ keycode = get_record_keycode(record, true);
+ }
#endif
if (!(