Browse Source
This is an improvement on retro-tap, solving the 'flashing hold' issue users people experience. When the tapping-term expires, the hold key is normally pressed. When retro-tap is enabled, this is undesirable; only an interrupted hold-tap should trigger the hold behavior. This change disables the hold behavior for the 'STATUS_HOLD_TIMER' state when retro-tap is enabled, and makes sure the 'STATUS_HOLD_INTERRUPT' state will be triggered when appropriate.xmkb
Okke Formsma
4 years ago
committed by
Pete Johanson
7 changed files with 19 additions and 81 deletions
@ -1,6 +0,0 @@ |
|||||||
s/.*hid_listener_keycode/kp/p |
|
||||||
s/.*mo_keymap_binding/mo/p |
|
||||||
s/.*on_hold_tap_binding/ht_binding/p |
|
||||||
s/.*decide_hold_tap/ht_decide/p |
|
||||||
s/.*update_hold_status_for_retro_tap/update_hold_status_for_retro_tap/p |
|
||||||
s/.*decide_retro_tap/decide_retro_tap/p |
|
@ -1,21 +0,0 @@ |
|||||||
ht_binding_pressed: 0 new undecided hold_tap |
|
||||||
ht_decide: 0 decided tap (tap-preferred decision moment key-up) |
|
||||||
kp_pressed: usage_page 0x07 keycode 0x09 implicit_mods 0x00 explicit_mods 0x00 |
|
||||||
kp_released: usage_page 0x07 keycode 0x09 implicit_mods 0x00 explicit_mods 0x00 |
|
||||||
ht_binding_released: 0 cleaning up hold-tap |
|
||||||
ht_binding_pressed: 0 new undecided hold_tap |
|
||||||
ht_decide: 0 decided hold-timer (tap-preferred decision moment timer) |
|
||||||
kp_pressed: usage_page 0x07 keycode 0xe1 implicit_mods 0x00 explicit_mods 0x00 |
|
||||||
kp_released: usage_page 0x07 keycode 0xe1 implicit_mods 0x00 explicit_mods 0x00 |
|
||||||
decide_retro_tap: 0 retro tap |
|
||||||
kp_pressed: usage_page 0x07 keycode 0x09 implicit_mods 0x00 explicit_mods 0x00 |
|
||||||
kp_released: usage_page 0x07 keycode 0x09 implicit_mods 0x00 explicit_mods 0x00 |
|
||||||
ht_binding_released: 0 cleaning up hold-tap |
|
||||||
ht_binding_pressed: 0 new undecided hold_tap |
|
||||||
ht_decide: 0 decided hold-timer (tap-preferred decision moment timer) |
|
||||||
kp_pressed: usage_page 0x07 keycode 0xe1 implicit_mods 0x00 explicit_mods 0x00 |
|
||||||
update_hold_status_for_retro_tap: Update hold tap 0 status to hold-interrupt |
|
||||||
kp_pressed: usage_page 0x07 keycode 0x07 implicit_mods 0x00 explicit_mods 0x00 |
|
||||||
kp_released: usage_page 0x07 keycode 0x07 implicit_mods 0x00 explicit_mods 0x00 |
|
||||||
kp_released: usage_page 0x07 keycode 0xe1 implicit_mods 0x00 explicit_mods 0x00 |
|
||||||
ht_binding_released: 0 cleaning up hold-tap |
|
@ -1,45 +0,0 @@ |
|||||||
#include <dt-bindings/zmk/keys.h> |
|
||||||
#include <behaviors.dtsi> |
|
||||||
#include <dt-bindings/zmk/kscan_mock.h> |
|
||||||
|
|
||||||
/ { |
|
||||||
behaviors { |
|
||||||
tp: behavior_tap_preferred { |
|
||||||
compatible = "zmk,behavior-hold-tap"; |
|
||||||
label = "MOD_TAP"; |
|
||||||
#binding-cells = <2>; |
|
||||||
flavor = "tap-preferred"; |
|
||||||
tapping_term_ms = <300>; |
|
||||||
bindings = <&kp>, <&kp>; |
|
||||||
retro-tap; |
|
||||||
}; |
|
||||||
}; |
|
||||||
|
|
||||||
keymap { |
|
||||||
compatible = "zmk,keymap"; |
|
||||||
label ="Default keymap"; |
|
||||||
|
|
||||||
default_layer { |
|
||||||
bindings = < |
|
||||||
&tp LEFT_SHIFT F &none |
|
||||||
&kp D &none>; |
|
||||||
}; |
|
||||||
}; |
|
||||||
}; |
|
||||||
|
|
||||||
|
|
||||||
&kscan { |
|
||||||
events = < |
|
||||||
/* tap */ |
|
||||||
ZMK_MOCK_PRESS(0,0,10) |
|
||||||
ZMK_MOCK_RELEASE(0,0,10) |
|
||||||
/* retro tap */ |
|
||||||
ZMK_MOCK_PRESS(0,0,400) |
|
||||||
ZMK_MOCK_RELEASE(0,0,10) |
|
||||||
/* hold */ |
|
||||||
ZMK_MOCK_PRESS(0,0,400) |
|
||||||
ZMK_MOCK_PRESS(1,0,10) |
|
||||||
ZMK_MOCK_RELEASE(1,0,10) |
|
||||||
ZMK_MOCK_RELEASE(0,0,10) |
|
||||||
>; |
|
||||||
}; |
|
Loading…
Reference in new issue