From 8d4d2eec4deb9081e6402e6558c600a48e010570 Mon Sep 17 00:00:00 2001 From: Gergely Nagy Date: Sat, 17 Mar 2018 10:12:05 +0100 Subject: [PATCH] handleKeyswitchEvent: Document the behaviour for idle keys Since keyboardio/Kaleidoscope-Hardware-Model01#23 we do not call `handleKeyswitchEvent` for keys that are idle. Document this in the comments. Signed-off-by: Gergely Nagy --- src/key_events.h | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/src/key_events.h b/src/key_events.h index 6bfa62cf..0eaded48 100644 --- a/src/key_events.h +++ b/src/key_events.h @@ -17,8 +17,10 @@ extern const Key keymaps[][ROWS][COLS]; // sending events to the computer /* The event handling starts with the Scanner calling handleKeyswitchEvent() for - * every key in the matrix, and it is the task of this method to figure out what - * to do, it is the main entry point. + * every non-idle key in the matrix, and it is the task of this method to figure + * out what to do, it is the main entry point. Keys that were off in the + * previous scan cycle, and are still off now, are considered idle, and + * handleKeyswitchEvent() is *not* called on them. * * This function will iterate through an array of handler functions, and stop as * soon as one of them signals that the event has been handled. To make it @@ -45,4 +47,3 @@ extern const Key keymaps[][ROWS][COLS]; * injected, and is not a direct result of a keypress, coming from the scanner. */ void handleKeyswitchEvent(Key mappedKey, byte row, byte col, uint8_t keyState); -