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>master
parent
8640b43214
commit
437446ba8f
|
@ -604,6 +604,7 @@ void process_action(keyrecord_t *record, action_t action) {
|
||||||
swap_hands = false;
|
swap_hands = false;
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
|
# ifndef NO_ACTION_ONESHOT
|
||||||
case OP_SH_ONESHOT:
|
case OP_SH_ONESHOT:
|
||||||
if (event.pressed) {
|
if (event.pressed) {
|
||||||
set_oneshot_swaphands();
|
set_oneshot_swaphands();
|
||||||
|
@ -611,6 +612,7 @@ void process_action(keyrecord_t *record, action_t action) {
|
||||||
release_oneshot_swaphands();
|
release_oneshot_swaphands();
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
|
# endif
|
||||||
|
|
||||||
# ifndef NO_ACTION_TAPPING
|
# ifndef NO_ACTION_TAPPING
|
||||||
case OP_SH_TAP_TOGGLE:
|
case OP_SH_TAP_TOGGLE:
|
||||||
|
@ -701,10 +703,12 @@ void process_action(keyrecord_t *record, action_t action) {
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#ifdef SWAP_HANDS_ENABLE
|
#ifdef SWAP_HANDS_ENABLE
|
||||||
|
# ifndef NO_ACTION_ONESHOT
|
||||||
if (event.pressed && !(action.kind.id == ACT_SWAP_HANDS && action.swap.code == OP_SH_ONESHOT)) {
|
if (event.pressed && !(action.kind.id == ACT_SWAP_HANDS && action.swap.code == OP_SH_ONESHOT)) {
|
||||||
use_oneshot_swaphands();
|
use_oneshot_swaphands();
|
||||||
}
|
}
|
||||||
# endif
|
# endif
|
||||||
|
#endif
|
||||||
|
|
||||||
#ifndef NO_ACTION_ONESHOT
|
#ifndef NO_ACTION_ONESHOT
|
||||||
/* Because we switch layers after a oneshot event, we need to release the
|
/* Because we switch layers after a oneshot event, we need to release the
|
||||||
|
|
Loading…
Reference in New Issue