summaryrefslogtreecommitdiffstats
path: root/quantum
diff options
context:
space:
mode:
authorDavid Kosorin <david@kosorin.net>2023-01-02 11:16:24 +0100
committerGitHub <noreply@github.com>2023-01-02 11:16:24 +0100
commit0f5500182ca00907045bcb1cd870616b5a3bee11 (patch)
treee39753711ca9e207a08bfe3f1cc2b80a14ddec9c /quantum
parent24adecd9227931ebaec16115e05055e0b580d351 (diff)
Allow mod-tap hold action on one shot layer (#19214)
Diffstat (limited to 'quantum')
-rw-r--r--quantum/action.c7
1 files changed, 6 insertions, 1 deletions
diff --git a/quantum/action.c b/quantum/action.c
index f6fbb999c8..79ea2b7635 100644
--- a/quantum/action.c
+++ b/quantum/action.c
@@ -350,7 +350,12 @@ void process_action(keyrecord_t *record, action_t action) {
#ifndef NO_ACTION_ONESHOT
bool do_release_oneshot = false;
// notice we only clear the one shot layer if the pressed key is not a modifier.
- if (is_oneshot_layer_active() && event.pressed && (action.kind.id == ACT_USAGE || !IS_MOD(action.key.code))
+ if (is_oneshot_layer_active() && event.pressed &&
+ (action.kind.id == ACT_USAGE || !(IS_MOD(action.key.code)
+# ifndef NO_ACTION_TAPPING
+ || (tap_count == 0 && (action.kind.id == ACT_LMODS_TAP || action.kind.id == ACT_RMODS_TAP))
+# endif
+ ))
# ifdef SWAP_HANDS_ENABLE
&& !(action.kind.id == ACT_SWAP_HANDS && action.swap.code == OP_SH_ONESHOT)
# endif