zmk/app/tests/sticky-keys/9-sk-dn-up-dn-up/native_posix.keymap
Okke Formsma acf36f3ff3 bugfix(sticky-keys): Fix overlapping sticky keys
This fixes a bug with overlapping sticky keys when the same key
positions on multiple layers contain different sticky keys.

This also fixes the case when a MT has a sticky key for hold and a
different sticky key for the tap behavior.

Fixes #508
2021-02-19 20:16:14 +01:00

27 lines
No EOL
466 B
Text

#include <dt-bindings/zmk/keys.h>
#include <behaviors.dtsi>
#include <dt-bindings/zmk/kscan_mock.h>
/ {
keymap {
compatible = "zmk,keymap";
label ="Default keymap";
default_layer {
bindings = <
&sk LEFT_SHIFT &none
&none &none
>;
};
};
};
&kscan {
events = <
ZMK_MOCK_PRESS(0,0,10)
ZMK_MOCK_RELEASE(0,0,10)
/* the sticky key is pressed again. Now it's active twice! */
ZMK_MOCK_PRESS(0,0,10)
ZMK_MOCK_RELEASE(0,0,1200)
>;
};