Do not enable PERMISSIVE_HOLD when TAPPING_TERM exceeds 500ms (#15674)

This commit is contained in:
precondition 2022-06-24 12:40:09 +02:00 committed by GitHub
parent 0e60b3a620
commit 3b9e186019
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
21 changed files with 24 additions and 18 deletions

View file

@ -141,7 +141,7 @@ If you define these options you will enable the associated feature, which may in
## Behaviors That Can Be Configured ## Behaviors That Can Be Configured
* `#define TAPPING_TERM 200` * `#define TAPPING_TERM 200`
* how long before a tap becomes a hold, if set above 500, a key tapped during the tapping term will turn it into a hold too * how long before a key press becomes a hold
* `#define TAPPING_TERM_PER_KEY` * `#define TAPPING_TERM_PER_KEY`
* enables handling for per key `TAPPING_TERM` settings * enables handling for per key `TAPPING_TERM` settings
* `#define RETRO_TAPPING` * `#define RETRO_TAPPING`

View file

@ -144,7 +144,7 @@ QMK での全ての利用可能な設定にはデフォルトがあります。
## 設定可能な挙動 :id=behaviors-that-can-be-configured ## 設定可能な挙動 :id=behaviors-that-can-be-configured
* `#define TAPPING_TERM 200` * `#define TAPPING_TERM 200`
* タップがホールドになるまでの時間。500以上に設定された場合、タップ期間中にタップされたキーもホールドになります。(訳注: PERMISSIVE_HOLDも参照) * タップがホールドになるまでの時間。
* `#define TAPPING_TERM_PER_KEY` * `#define TAPPING_TERM_PER_KEY`
* キーごとの `TAPPING_TERM` 設定の処理を有効にします * キーごとの `TAPPING_TERM` 設定の処理を有効にします
* `#define RETRO_TAPPING` * `#define RETRO_TAPPING`

View file

@ -4,3 +4,4 @@
#pragma once #pragma once
#define TAPPING_TERM 500 #define TAPPING_TERM 500
#define PERMISSIVE_HOLD

View file

@ -3,6 +3,7 @@
/* tap dance stuff*/ /* tap dance stuff*/
#undef TAPPING_TERM #undef TAPPING_TERM
#define TAPPING_TERM 500 #define TAPPING_TERM 500
#define PERMISSIVE_HOLD
#define TAPPING_TOGGLE 2 #define TAPPING_TOGGLE 2
@ -12,4 +13,4 @@
#define EXAMPLESTRING4 "tapdance_4" #define EXAMPLESTRING4 "tapdance_4"
#undef RGBLED_NUM #undef RGBLED_NUM
#define RGBLED_NUM 16 #define RGBLED_NUM 16

View file

@ -24,3 +24,4 @@
// Long tapping term on the big switch, because it takes so long to press // Long tapping term on the big switch, because it takes so long to press
#define TAPPING_TERM 500 #define TAPPING_TERM 500
#define PERMISSIVE_HOLD

View file

@ -47,6 +47,7 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
/* Set 0 if debouncing isn't needed */ /* Set 0 if debouncing isn't needed */
#define DEBOUNCE 5 #define DEBOUNCE 5
#define TAPPING_TERM 500 #define TAPPING_TERM 500
#define PERMISSIVE_HOLD
/* /*
* Feature disable options * Feature disable options

View file

@ -42,6 +42,7 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
#define LOCKING_RESYNC_ENABLE #define LOCKING_RESYNC_ENABLE
#define TAPPING_TERM 500 #define TAPPING_TERM 500
#define PERMISSIVE_HOLD
/* /*
* Feature disable options * Feature disable options

View file

@ -57,6 +57,7 @@
#define LOCKING_RESYNC_ENABLE #define LOCKING_RESYNC_ENABLE
#define TAPPING_TERM 500 #define TAPPING_TERM 500
#define PERMISSIVE_HOLD
// RGB Stuff // RGB Stuff
#define RGB_DI_PIN B0 #define RGB_DI_PIN B0

View file

@ -13,8 +13,6 @@
#undef TAPPING_TERM #undef TAPPING_TERM
#define TAPPING_TERM 300 #define TAPPING_TERM 300
#define PERMISSIVE_HOLD #define PERMISSIVE_HOLD
/* when TAPPING_TERM >= 500 same effect PERMISSIVE_HOLD.
see tmk_core/common/action_tapping.c */
// If you need more program area, try select and reduce rgblight modes to use. // If you need more program area, try select and reduce rgblight modes to use.

View file

@ -6,8 +6,6 @@
#undef TAPPING_TERM #undef TAPPING_TERM
#define TAPPING_TERM 300 #define TAPPING_TERM 300
#define PERMISSIVE_HOLD #define PERMISSIVE_HOLD
/* when TAPPING_TERM >= 500 same effect PERMISSIVE_HOLD.
see tmk_core/common/action_tapping.c */
#undef OLED_UPDATE_INTERVAL #undef OLED_UPDATE_INTERVAL
#ifdef DEBUG_MATRIX_SCAN_RATE #ifdef DEBUG_MATRIX_SCAN_RATE

View file

@ -6,8 +6,6 @@
#undef TAPPING_TERM #undef TAPPING_TERM
#define TAPPING_TERM 300 #define TAPPING_TERM 300
#define PERMISSIVE_HOLD #define PERMISSIVE_HOLD
/* when TAPPING_TERM >= 500 same effect PERMISSIVE_HOLD.
see tmk_core/common/action_tapping.c */
#undef OLED_UPDATE_INTERVAL #undef OLED_UPDATE_INTERVAL
#ifdef DEBUG_MATRIX_SCAN_RATE #ifdef DEBUG_MATRIX_SCAN_RATE

View file

@ -18,6 +18,7 @@
#define DRIVER_LED_UNDERGLOW 10 #define DRIVER_LED_UNDERGLOW 10
#define TAPPING_TERM 500 #define TAPPING_TERM 500
#define PERMISSIVE_HOLD
#if defined(RGB_MATRIX_ENABLE) #if defined(RGB_MATRIX_ENABLE)
#undef RGB_MATRIX_MAXIMUM_BRIGHTNESS #undef RGB_MATRIX_MAXIMUM_BRIGHTNESS

View file

@ -4,5 +4,6 @@
#include "../../config.h" #include "../../config.h"
#define TAPPING_TERM 500 #define TAPPING_TERM 500
#define PERMISSIVE_HOLD
#endif #endif

View file

@ -1,6 +1,7 @@
#pragma once #pragma once
#define TAPPING_TERM 505 #define TAPPING_TERM 505
#define PERMISSIVE_HOLD
#define RETRO_TAPPING #define RETRO_TAPPING
// smooth mousekeys (copied from the ergo ez config) // smooth mousekeys (copied from the ergo ez config)

View file

@ -19,5 +19,6 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
#define CONFIG_USER_H #define CONFIG_USER_H
#define TAPPING_TERM 1000 #define TAPPING_TERM 1000
#define PERMISSIVE_HOLD
#endif #endif

View file

@ -1,3 +1,4 @@
#pragma once #pragma once
#define TAPPING_TERM 500 #define TAPPING_TERM 500
#define PERMISSIVE_HOLD

View file

@ -51,3 +51,4 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
/* long tapping config */ /* long tapping config */
#define TAPPING_TERM 500 #define TAPPING_TERM 500
#define PERMISSIVE_HOLD

View file

@ -1,5 +1,6 @@
#pragma once #pragma once
#define TAPPING_TERM 600 // ms #define TAPPING_TERM 600 // ms
#define PERMISSIVE_HOLD
#undef RGBLIGHT_HUE_STEP #undef RGBLIGHT_HUE_STEP
#define RGBLIGHT_HUE_STEP 8 #define RGBLIGHT_HUE_STEP 8

View file

@ -1,5 +1,5 @@
#pragma once #pragma once
#undef TAPPING_TERM #undef TAPPING_TERM
#define TAPPING_TERM 300 //At 500 some bad logic takes hold #define TAPPING_TERM 300
#define IGNORE_MOD_TAP_INTERRUPT #define IGNORE_MOD_TAP_INTERRUPT

View file

@ -125,7 +125,7 @@ void action_tapping_process(keyrecord_t record) {
/* return true when key event is processed or consumed. */ /* return true when key event is processed or consumed. */
bool process_tapping(keyrecord_t *keyp) { bool process_tapping(keyrecord_t *keyp) {
keyevent_t event = keyp->event; keyevent_t event = keyp->event;
# if (defined(AUTO_SHIFT_ENABLE) && defined(RETRO_SHIFT)) || defined(TAPPING_TERM_PER_KEY) || defined(PERMISSIVE_HOLD_PER_KEY) || defined(TAPPING_FORCE_HOLD_PER_KEY) || defined(HOLD_ON_OTHER_KEY_PRESS_PER_KEY) # if (defined(AUTO_SHIFT_ENABLE) && defined(RETRO_SHIFT)) || defined(PERMISSIVE_HOLD_PER_KEY) || defined(TAPPING_FORCE_HOLD_PER_KEY) || defined(HOLD_ON_OTHER_KEY_PRESS_PER_KEY)
uint16_t tapping_keycode = get_record_keycode(&tapping_key, false); uint16_t tapping_keycode = get_record_keycode(&tapping_key, false);
# endif # endif
@ -164,17 +164,15 @@ bool process_tapping(keyrecord_t *keyp) {
* useful for long TAPPING_TERM but may prevent fast typing. * useful for long TAPPING_TERM but may prevent fast typing.
*/ */
// clang-format off // clang-format off
# if defined(TAPPING_TERM_PER_KEY) || (TAPPING_TERM >= 500) || defined(PERMISSIVE_HOLD) || defined(PERMISSIVE_HOLD_PER_KEY) || (defined(AUTO_SHIFT_ENABLE) && defined(RETRO_SHIFT)) # if defined(PERMISSIVE_HOLD) || defined(PERMISSIVE_HOLD_PER_KEY) || (defined(AUTO_SHIFT_ENABLE) && defined(RETRO_SHIFT))
else if ( else if (
( (
( IS_RELEASED(event) && waiting_buffer_typed(event)
GET_TAPPING_TERM(tapping_keycode, &tapping_key) >= 500
# ifdef PERMISSIVE_HOLD_PER_KEY # ifdef PERMISSIVE_HOLD_PER_KEY
|| get_permissive_hold(tapping_keycode, &tapping_key) && get_permissive_hold(tapping_keycode, &tapping_key)
# elif defined(PERMISSIVE_HOLD) # elif defined(PERMISSIVE_HOLD)
|| true && true
# endif # endif
) && IS_RELEASED(event) && waiting_buffer_typed(event)
) )
// Causes nested taps to not wait past TAPPING_TERM/RETRO_SHIFT // Causes nested taps to not wait past TAPPING_TERM/RETRO_SHIFT
// unnecessarily and fixes them for Layer Taps. // unnecessarily and fixes them for Layer Taps.

View file

@ -15,4 +15,5 @@
*/ */
#pragma once #pragma once
#define LONG_TAPPING_TERM 1000 #define LONG_TAPPING_TERM 1000
#define PERMISSIVE_HOLD