From aca804c738f45a64af79e8571470872ad4c056a1 Mon Sep 17 00:00:00 2001 From: Federico Amedeo Izzo Date: Thu, 24 Dec 2020 17:29:24 +0100 Subject: [PATCH] KBD: Fix double events generated from long + short press. The problem was caused by kbd_task() sending an old copy of the keyboard map. This was necessary when the events were triggered on key lift but since now events are sent on key press, this is no more necessary. --- openrtx/src/threads.c | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/openrtx/src/threads.c b/openrtx/src/threads.c index b06d7ce3..f70e70f5 100644 --- a/openrtx/src/threads.c +++ b/openrtx/src/threads.c @@ -207,10 +207,7 @@ static void kbd_task(void *arg) { kbd_msg_t msg; msg.long_press = long_press; - // OR the saved key status with the current key status - // Do this because the new key status is got when the - // key is lifted, and does not contain the pressed key anymore - msg.keys = keys | prev_keys; + msg.keys = keys; // Send event_t as void * message to use with OSQPost event_t event; event.type = EVENT_KBD;