diff options
| -rw-r--r-- | doc/keymap.md | 3 | ||||
| -rw-r--r-- | tmk_core/common/action_tapping.c | 9 |
2 files changed, 8 insertions, 4 deletions
diff --git a/doc/keymap.md b/doc/keymap.md index 6f2a663fc..2b0d2cd95 100644 --- a/doc/keymap.md +++ b/doc/keymap.md | |||
| @@ -549,6 +549,9 @@ Layer switching with tap key: | |||
| 549 | 549 | ||
| 550 | [dual_role]: http://en.wikipedia.org/wiki/Modifier_key#Dual-role_keys | 550 | [dual_role]: http://en.wikipedia.org/wiki/Modifier_key#Dual-role_keys |
| 551 | 551 | ||
| 552 | When user hold a key after tap, it repeat the tapped key rather to hold a modifier key. | ||
| 553 | If you prefer to hold a modifier instead, define `TAPPING_FORCE_HOLD` in `config.h`. | ||
| 554 | See https://github.com/qmk/qmk_firmware/issues/889 for the detail. | ||
| 552 | 555 | ||
| 553 | ### 4.2 Tap Toggle | 556 | ### 4.2 Tap Toggle |
| 554 | This is a feature to assign both toggle layer and momentary switch layer action to just same one physical key. It works as momentary layer switch when holding a key but toggle switch with several taps. | 557 | This is a feature to assign both toggle layer and momentary switch layer action to just same one physical key. It works as momentary layer switch when holding a key but toggle switch with several taps. |
diff --git a/tmk_core/common/action_tapping.c b/tmk_core/common/action_tapping.c index ff78d7f2a..bd9a69ae0 100644 --- a/tmk_core/common/action_tapping.c +++ b/tmk_core/common/action_tapping.c | |||
| @@ -228,6 +228,7 @@ bool process_tapping(keyrecord_t *keyp) | |||
| 228 | if (WITHIN_TAPPING_TERM(event)) { | 228 | if (WITHIN_TAPPING_TERM(event)) { |
| 229 | if (event.pressed) { | 229 | if (event.pressed) { |
| 230 | if (IS_TAPPING_KEY(event.key)) { | 230 | if (IS_TAPPING_KEY(event.key)) { |
| 231 | #ifndef TAPPING_FORCE_HOLD | ||
| 231 | if (!tapping_key.tap.interrupted && tapping_key.tap.count > 0) { | 232 | if (!tapping_key.tap.interrupted && tapping_key.tap.count > 0) { |
| 232 | // sequential tap. | 233 | // sequential tap. |
| 233 | keyp->tap = tapping_key.tap; | 234 | keyp->tap = tapping_key.tap; |
| @@ -237,11 +238,11 @@ bool process_tapping(keyrecord_t *keyp) | |||
| 237 | tapping_key = *keyp; | 238 | tapping_key = *keyp; |
| 238 | debug_tapping_key(); | 239 | debug_tapping_key(); |
| 239 | return true; | 240 | return true; |
| 240 | } else { | ||
| 241 | // FIX: start new tap again | ||
| 242 | tapping_key = *keyp; | ||
| 243 | return true; | ||
| 244 | } | 241 | } |
| 242 | #endif | ||
| 243 | // FIX: start new tap again | ||
| 244 | tapping_key = *keyp; | ||
| 245 | return true; | ||
| 245 | } else if (is_tap_key(event.key)) { | 246 | } else if (is_tap_key(event.key)) { |
| 246 | // Sequential tap can be interfered with other tap key. | 247 | // Sequential tap can be interfered with other tap key. |
| 247 | debug("Tapping: Start with interfering other tap.\n"); | 248 | debug("Tapping: Start with interfering other tap.\n"); |
