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 <algernon@keyboard.io>
pull/308/head
Gergely Nagy 7 years ago
parent cd94ffe24c
commit 8d4d2eec4d

@ -17,8 +17,10 @@ extern const Key keymaps[][ROWS][COLS];
// sending events to the computer // sending events to the computer
/* The event handling starts with the Scanner calling handleKeyswitchEvent() for /* 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 * every non-idle key in the matrix, and it is the task of this method to figure
* to do, it is the main entry point. * 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 * 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 * 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. * 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); void handleKeyswitchEvent(Key mappedKey, byte row, byte col, uint8_t keyState);

Loading…
Cancel
Save