From ee6f87c73550c261b50c90f8d4af4c1e233db0f9 Mon Sep 17 00:00:00 2001 From: Federico Amedeo Izzo Date: Mon, 14 Dec 2020 16:12:09 +0100 Subject: [PATCH] KBD: Add missing keyboard state save --- openrtx/src/threads.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/openrtx/src/threads.c b/openrtx/src/threads.c index 6b6e6bad..64483c84 100644 --- a/openrtx/src/threads.c +++ b/openrtx/src/threads.c @@ -176,6 +176,8 @@ static void kbd_task(void *arg) OSQPost(&ui_queue, (void *)event.value, sizeof(event_t), OS_OPT_POST_FIFO + OS_OPT_POST_NO_SCHED, &os_err); } + // Save current keyboard state as previous + prev_keys = keys; } // Read keyboard state at 5Hz OSTimeDlyHMSM(0u, 0u, 0u, 200u, OS_OPT_TIME_HMSM_STRICT, &os_err);