aboutsummaryrefslogtreecommitdiff
path: root/tmk_core
diff options
context:
space:
mode:
authorTsan-Kuang Lee <1425438+tsankuanglee@users.noreply.github.com>2020-06-10 16:40:17 -0500
committerGitHub <noreply@github.com>2020-06-10 22:40:17 +0100
commit437446ba8f636afbc2048aa655fc1c2662fbe2ce (patch)
treeb50a79c84da6bf52301e3daa59730b2c41de53fb /tmk_core
parent8640b432148d44bc54ebabbc8be42b22b91a3ec4 (diff)
downloadqmk_firmware-437446ba8f636afbc2048aa655fc1c2662fbe2ce.tar.gz
qmk_firmware-437446ba8f636afbc2048aa655fc1c2662fbe2ce.zip
Fix one shot swaphands compiler error when NO_ACTION_ONESHOT is defined (#9296)
* init * add RETRO_TAP; tap anyway after TAP_TERM, if no interruption * RETRO_TAP works for other types of taps * revert to upstream/master * explain this fork in readme * use one readme.md file instaed * fix the error if NO_ACTION_ONESHOT is defined * restore readme.md to upstream master Co-authored-by: Tsan-Kuang Lee <tsan.kuang.lee@gmail.com>
Diffstat (limited to 'tmk_core')
-rw-r--r--tmk_core/common/action.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/tmk_core/common/action.c b/tmk_core/common/action.c
index 909b9c39c..b39836f0f 100644
--- a/tmk_core/common/action.c
+++ b/tmk_core/common/action.c
@@ -604,6 +604,7 @@ void process_action(keyrecord_t *record, action_t action) {
604 swap_hands = false; 604 swap_hands = false;
605 } 605 }
606 break; 606 break;
607# ifndef NO_ACTION_ONESHOT
607 case OP_SH_ONESHOT: 608 case OP_SH_ONESHOT:
608 if (event.pressed) { 609 if (event.pressed) {
609 set_oneshot_swaphands(); 610 set_oneshot_swaphands();
@@ -611,6 +612,7 @@ void process_action(keyrecord_t *record, action_t action) {
611 release_oneshot_swaphands(); 612 release_oneshot_swaphands();
612 } 613 }
613 break; 614 break;
615# endif
614 616
615# ifndef NO_ACTION_TAPPING 617# ifndef NO_ACTION_TAPPING
616 case OP_SH_TAP_TOGGLE: 618 case OP_SH_TAP_TOGGLE:
@@ -701,9 +703,11 @@ void process_action(keyrecord_t *record, action_t action) {
701#endif 703#endif
702 704
703#ifdef SWAP_HANDS_ENABLE 705#ifdef SWAP_HANDS_ENABLE
706# ifndef NO_ACTION_ONESHOT
704 if (event.pressed && !(action.kind.id == ACT_SWAP_HANDS && action.swap.code == OP_SH_ONESHOT)) { 707 if (event.pressed && !(action.kind.id == ACT_SWAP_HANDS && action.swap.code == OP_SH_ONESHOT)) {
705 use_oneshot_swaphands(); 708 use_oneshot_swaphands();
706 } 709 }
710# endif
707#endif 711#endif
708 712
709#ifndef NO_ACTION_ONESHOT 713#ifndef NO_ACTION_ONESHOT