Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Do not enable PERMISSIVE_HOLD when TAPPING_TERM exceeds 500ms #15674

Merged
merged 4 commits into from
Jun 24, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion docs/config_options.md
Original file line number Diff line number Diff line change
Expand Up @@ -141,7 +141,7 @@ If you define these options you will enable the associated feature, which may in
## Behaviors That Can Be Configured

* `#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`
* enables handling for per key `TAPPING_TERM` settings
* `#define RETRO_TAPPING`
Expand Down
2 changes: 1 addition & 1 deletion docs/ja/config_options.md
Original file line number Diff line number Diff line change
Expand Up @@ -144,7 +144,7 @@ QMK での全ての利用可能な設定にはデフォルトがあります。
## 設定可能な挙動 :id=behaviors-that-can-be-configured

* `#define TAPPING_TERM 200`
* タップがホールドになるまでの時間。500以上に設定された場合、タップ期間中にタップされたキーもホールドになります。(訳注: PERMISSIVE_HOLDも参照)
* タップがホールドになるまでの時間。
* `#define TAPPING_TERM_PER_KEY`
* キーごとの `TAPPING_TERM` 設定の処理を有効にします
* `#define RETRO_TAPPING`
Expand Down
1 change: 1 addition & 0 deletions keyboards/1k/keymaps/tap_dance/config.h
Original file line number Diff line number Diff line change
Expand Up @@ -4,3 +4,4 @@
#pragma once

#define TAPPING_TERM 500
#define PERMISSIVE_HOLD
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
/* tap dance stuff*/
#undef TAPPING_TERM
#define TAPPING_TERM 500
#define PERMISSIVE_HOLD

#define TAPPING_TOGGLE 2

Expand All @@ -12,4 +13,4 @@
#define EXAMPLESTRING4 "tapdance_4"

#undef RGBLED_NUM
#define RGBLED_NUM 16
#define RGBLED_NUM 16
1 change: 1 addition & 0 deletions keyboards/flehrad/bigswitch/keymaps/333fred/config.h
Original file line number Diff line number Diff line change
Expand Up @@ -24,3 +24,4 @@

// Long tapping term on the big switch, because it takes so long to press
#define TAPPING_TERM 500
#define PERMISSIVE_HOLD
1 change: 1 addition & 0 deletions keyboards/handwired/ergocheap/config.h
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,7 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
/* Set 0 if debouncing isn't needed */
#define DEBOUNCE 5
#define TAPPING_TERM 500
#define PERMISSIVE_HOLD

/*
* Feature disable options
Expand Down
1 change: 1 addition & 0 deletions keyboards/handwired/onekey/config.h
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,7 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
#define LOCKING_RESYNC_ENABLE

#define TAPPING_TERM 500
#define PERMISSIVE_HOLD

/*
* Feature disable options
Expand Down
1 change: 1 addition & 0 deletions keyboards/handwired/uthol/rev3/config.h
Original file line number Diff line number Diff line change
Expand Up @@ -57,6 +57,7 @@
#define LOCKING_RESYNC_ENABLE

#define TAPPING_TERM 500
#define PERMISSIVE_HOLD

// RGB Stuff
#define RGB_DI_PIN B0
Expand Down
2 changes: 0 additions & 2 deletions keyboards/helix/pico/keymaps/mtei/config.h
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,6 @@
#undef TAPPING_TERM
#define TAPPING_TERM 300
#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.

2 changes: 0 additions & 2 deletions keyboards/helix/rev2/keymaps/five_rows/config.h
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,6 @@
#undef TAPPING_TERM
#define TAPPING_TERM 300
#define PERMISSIVE_HOLD
/* when TAPPING_TERM >= 500 same effect PERMISSIVE_HOLD.
see tmk_core/common/action_tapping.c */

#undef OLED_UPDATE_INTERVAL
#ifdef DEBUG_MATRIX_SCAN_RATE
Expand Down
2 changes: 0 additions & 2 deletions keyboards/helix/rev3_5rows/keymaps/five_rows/config.h
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,6 @@
#undef TAPPING_TERM
#define TAPPING_TERM 300
#define PERMISSIVE_HOLD
/* when TAPPING_TERM >= 500 same effect PERMISSIVE_HOLD.
see tmk_core/common/action_tapping.c */

#undef OLED_UPDATE_INTERVAL
#ifdef DEBUG_MATRIX_SCAN_RATE
Expand Down
1 change: 1 addition & 0 deletions keyboards/idobao/id67/keymaps/thewerther/config.h
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@

#define DRIVER_LED_UNDERGLOW 10
#define TAPPING_TERM 500
#define PERMISSIVE_HOLD

#if defined(RGB_MATRIX_ENABLE)
#undef RGB_MATRIX_MAXIMUM_BRIGHTNESS
Expand Down
1 change: 1 addition & 0 deletions keyboards/thevankeyboards/minivan/keymaps/belak/config.h
Original file line number Diff line number Diff line change
Expand Up @@ -4,5 +4,6 @@
#include "../../config.h"

#define TAPPING_TERM 500
#define PERMISSIVE_HOLD

#endif
1 change: 1 addition & 0 deletions keyboards/thevankeyboards/minivan/keymaps/halvves/config.h
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
#pragma once

#define TAPPING_TERM 505
#define PERMISSIVE_HOLD
#define RETRO_TAPPING

// smooth mousekeys (copied from the ergo ez config)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,5 +19,6 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
#define CONFIG_USER_H

#define TAPPING_TERM 1000
#define PERMISSIVE_HOLD

#endif
1 change: 1 addition & 0 deletions keyboards/xiudi/xd002/keymaps/tap_dance/config.h
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
#pragma once

#define TAPPING_TERM 500
#define PERMISSIVE_HOLD
1 change: 1 addition & 0 deletions keyboards/zfrontier/big_switch/config.h
Original file line number Diff line number Diff line change
Expand Up @@ -51,3 +51,4 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.

/* long tapping config */
#define TAPPING_TERM 500
#define PERMISSIVE_HOLD
1 change: 1 addition & 0 deletions layouts/community/66_ansi/xyverz/config.h
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
#pragma once

#define TAPPING_TERM 600 // ms
#define PERMISSIVE_HOLD
#undef RGBLIGHT_HUE_STEP
#define RGBLIGHT_HUE_STEP 8
2 changes: 1 addition & 1 deletion layouts/community/ergodox/adam/config.h
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
#pragma once

#undef TAPPING_TERM
#define TAPPING_TERM 300 //At 500 some bad logic takes hold
#define TAPPING_TERM 300
#define IGNORE_MOD_TAP_INTERRUPT
12 changes: 5 additions & 7 deletions quantum/action_tapping.c
Original file line number Diff line number Diff line change
Expand Up @@ -125,7 +125,7 @@ void action_tapping_process(keyrecord_t record) {
/* return true when key event is processed or consumed. */
bool process_tapping(keyrecord_t *keyp) {
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);
# endif

Expand Down Expand Up @@ -164,17 +164,15 @@ bool process_tapping(keyrecord_t *keyp) {
* useful for long TAPPING_TERM but may prevent fast typing.
*/
// 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))
KarlK90 marked this conversation as resolved.
Show resolved Hide resolved
# if defined(PERMISSIVE_HOLD) || defined(PERMISSIVE_HOLD_PER_KEY) || (defined(AUTO_SHIFT_ENABLE) && defined(RETRO_SHIFT))
else if (
(
(
GET_TAPPING_TERM(tapping_keycode, &tapping_key) >= 500
KarlK90 marked this conversation as resolved.
Show resolved Hide resolved
IS_RELEASED(event) && waiting_buffer_typed(event)
# ifdef PERMISSIVE_HOLD_PER_KEY
|| get_permissive_hold(tapping_keycode, &tapping_key)
&& get_permissive_hold(tapping_keycode, &tapping_key)
# elif defined(PERMISSIVE_HOLD)
|| true
&& true
# endif
) && IS_RELEASED(event) && waiting_buffer_typed(event)
)
// Causes nested taps to not wait past TAPPING_TERM/RETRO_SHIFT
// unnecessarily and fixes them for Layer Taps.
Expand Down
3 changes: 2 additions & 1 deletion users/hvp/config.h
Original file line number Diff line number Diff line change
Expand Up @@ -15,4 +15,5 @@
*/
#pragma once

#define LONG_TAPPING_TERM 1000
#define LONG_TAPPING_TERM 1000
#define PERMISSIVE_HOLD