mirror of
https://github.com/firewalkwithm3/qmk_firmware.git
synced 2024-11-22 11:30:30 +08:00
parent
fd2925efba
commit
64f9779fe5
|
@ -549,6 +549,9 @@ Layer switching with tap key:
|
||||||
|
|
||||||
[dual_role]: http://en.wikipedia.org/wiki/Modifier_key#Dual-role_keys
|
[dual_role]: http://en.wikipedia.org/wiki/Modifier_key#Dual-role_keys
|
||||||
|
|
||||||
|
When user hold a key after tap, it repeat the tapped key rather to hold a modifier key.
|
||||||
|
If you prefer to hold a modifier instead, define `TAPPING_FORCE_HOLD` in `config.h`.
|
||||||
|
See https://github.com/qmk/qmk_firmware/issues/889 for the detail.
|
||||||
|
|
||||||
### 4.2 Tap Toggle
|
### 4.2 Tap Toggle
|
||||||
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.
|
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.
|
||||||
|
|
|
@ -228,6 +228,7 @@ bool process_tapping(keyrecord_t *keyp)
|
||||||
if (WITHIN_TAPPING_TERM(event)) {
|
if (WITHIN_TAPPING_TERM(event)) {
|
||||||
if (event.pressed) {
|
if (event.pressed) {
|
||||||
if (IS_TAPPING_KEY(event.key)) {
|
if (IS_TAPPING_KEY(event.key)) {
|
||||||
|
#ifndef TAPPING_FORCE_HOLD
|
||||||
if (!tapping_key.tap.interrupted && tapping_key.tap.count > 0) {
|
if (!tapping_key.tap.interrupted && tapping_key.tap.count > 0) {
|
||||||
// sequential tap.
|
// sequential tap.
|
||||||
keyp->tap = tapping_key.tap;
|
keyp->tap = tapping_key.tap;
|
||||||
|
@ -237,11 +238,11 @@ bool process_tapping(keyrecord_t *keyp)
|
||||||
tapping_key = *keyp;
|
tapping_key = *keyp;
|
||||||
debug_tapping_key();
|
debug_tapping_key();
|
||||||
return true;
|
return true;
|
||||||
} else {
|
|
||||||
// FIX: start new tap again
|
|
||||||
tapping_key = *keyp;
|
|
||||||
return true;
|
|
||||||
}
|
}
|
||||||
|
#endif
|
||||||
|
// FIX: start new tap again
|
||||||
|
tapping_key = *keyp;
|
||||||
|
return true;
|
||||||
} else if (is_tap_key(event.key)) {
|
} else if (is_tap_key(event.key)) {
|
||||||
// Sequential tap can be interfered with other tap key.
|
// Sequential tap can be interfered with other tap key.
|
||||||
debug("Tapping: Start with interfering other tap.\n");
|
debug("Tapping: Start with interfering other tap.\n");
|
||||||
|
|
Loading…
Reference in a new issue