From 8f666cecc9717b3fbbe2f5f34375b6a45b8965fd Mon Sep 17 00:00:00 2001 From: Joel Spadin Date: Sun, 11 Oct 2020 18:38:39 -0500 Subject: feat(endpoints): clear HID report on endpoint change This prevents stuck keys when switching endpoints by clearing everything in the HID report and sending one last report before switching to the new endpoint. --- app/include/zmk/hid.h | 2 ++ 1 file changed, 2 insertions(+) (limited to 'app/include') diff --git a/app/include/zmk/hid.h b/app/include/zmk/hid.h index 744de98..04b12e1 100644 --- a/app/include/zmk/hid.h +++ b/app/include/zmk/hid.h @@ -165,9 +165,11 @@ int zmk_hid_register_mods(zmk_mod_flags modifiers); int zmk_hid_unregister_mods(zmk_mod_flags modifiers); int zmk_hid_keypad_press(zmk_key key); int zmk_hid_keypad_release(zmk_key key); +void zmk_hid_keypad_clear(); int zmk_hid_consumer_press(zmk_key key); int zmk_hid_consumer_release(zmk_key key); +void zmk_hid_consumer_clear(); struct zmk_hid_keypad_report *zmk_hid_get_keypad_report(); struct zmk_hid_consumer_report *zmk_hid_get_consumer_report(); -- cgit v1.2.3