From 7f6c26d6583c2a432201177f5f8b4dc96077eb50 Mon Sep 17 00:00:00 2001 From: Jesse Vincent Date: Tue, 20 Nov 2018 16:57:20 -0800 Subject: [PATCH] Report the current keyboard state to Kaleidoscope on every loop not just when the timer triggers Signed-off-by: Jesse Vincent --- src/kaleidoscope/hardware/ATMegaKeyboard.cpp | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/src/kaleidoscope/hardware/ATMegaKeyboard.cpp b/src/kaleidoscope/hardware/ATMegaKeyboard.cpp index 1a41678c..807f3682 100644 --- a/src/kaleidoscope/hardware/ATMegaKeyboard.cpp +++ b/src/kaleidoscope/hardware/ATMegaKeyboard.cpp @@ -110,12 +110,12 @@ void __attribute__((optimize(3))) ATMegaKeyboard::actOnMatrixScan() { } void ATMegaKeyboard::scanMatrix() { - if (!do_scan_) - return; - - do_scan_ = false; - - KeyboardHardware.readMatrix(); + if (do_scan_) { + do_scan_ = false; + // We only want to update our matrix if the timer has expired. + KeyboardHardware.readMatrix(); + } + // We ALWAYS want to tell Kaleidoscope about the state of the matrix KeyboardHardware.actOnMatrixScan(); }