Browse Source
Quick release for sticky keys failed for non-layer keys. The sticky key was released just before the key that was supposed to be modified was handled. The issue was caused by an error in the sticky key logic, which released the sticky key before handling the key up event. Fixes #696.xmkb
Okke Formsma
4 years ago
committed by
Pete Johanson
4 changed files with 45 additions and 3 deletions
@ -0,0 +1 @@ |
|||||||
|
s/.*hid_listener_keycode_//p |
@ -0,0 +1,10 @@ |
|||||||
|
pressed: usage_page 0x07 keycode 0x08 implicit_mods 0x00 explicit_mods 0x00 |
||||||
|
pressed: usage_page 0x07 keycode 0x04 implicit_mods 0x00 explicit_mods 0x00 |
||||||
|
released: usage_page 0x07 keycode 0x08 implicit_mods 0x00 explicit_mods 0x00 |
||||||
|
pressed: usage_page 0x07 keycode 0x05 implicit_mods 0x00 explicit_mods 0x00 |
||||||
|
released: usage_page 0x07 keycode 0x04 implicit_mods 0x00 explicit_mods 0x00 |
||||||
|
released: usage_page 0x07 keycode 0x05 implicit_mods 0x00 explicit_mods 0x00 |
||||||
|
pressed: usage_page 0x07 keycode 0x08 implicit_mods 0x00 explicit_mods 0x00 |
||||||
|
pressed: usage_page 0x07 keycode 0x04 implicit_mods 0x00 explicit_mods 0x00 |
||||||
|
released: usage_page 0x07 keycode 0x08 implicit_mods 0x00 explicit_mods 0x00 |
||||||
|
released: usage_page 0x07 keycode 0x04 implicit_mods 0x00 explicit_mods 0x00 |
@ -0,0 +1,26 @@ |
|||||||
|
#include <dt-bindings/zmk/keys.h> |
||||||
|
#include <behaviors.dtsi> |
||||||
|
#include <dt-bindings/zmk/kscan_mock.h> |
||||||
|
#include "../behavior_keymap.dtsi" |
||||||
|
|
||||||
|
&sk { |
||||||
|
quick-release; |
||||||
|
}; |
||||||
|
|
||||||
|
&kscan { |
||||||
|
events = < |
||||||
|
ZMK_MOCK_PRESS(0,0,10) |
||||||
|
ZMK_MOCK_RELEASE(0,0,10) |
||||||
|
ZMK_MOCK_PRESS(1,0,10) |
||||||
|
/* second key is pressed shortly after the first. It should not be capitalized. */ |
||||||
|
ZMK_MOCK_PRESS(1,1,10) |
||||||
|
ZMK_MOCK_RELEASE(1,0,10) |
||||||
|
ZMK_MOCK_RELEASE(1,1,10) |
||||||
|
|
||||||
|
/* repeat test to check if cleanup is done correctly */ |
||||||
|
ZMK_MOCK_PRESS(0,0,10) |
||||||
|
ZMK_MOCK_RELEASE(0,0,10) |
||||||
|
ZMK_MOCK_PRESS(1,0,10) |
||||||
|
ZMK_MOCK_RELEASE(1,0,10) |
||||||
|
>; |
||||||
|
}; |
Loading…
Reference in new issue