Report all keys as released when lid is closed

This commit is contained in:
Jeremy Soller
2021-04-02 10:33:35 -06:00
committed by Jeremy Soller
parent a04d353096
commit 16778e4a41

View File

@ -60,6 +60,11 @@ void kbscan_init(void) {
#define DEBOUNCE_DELAY 15 #define DEBOUNCE_DELAY 15
static uint8_t kbscan_get_row(int i) { static uint8_t kbscan_get_row(int i) {
// Report all keys as released when lid is closed
if (!lid_state) {
return 0;
}
// Set current line as output // Set current line as output
if (i < 8) { if (i < 8) {
KSOLGOEN = 1 << i; KSOLGOEN = 1 << i;