Fixed key press/release to match reality
This commit is contained in:
parent
f76fe8a787
commit
e053a7b4b0
2
.gitignore
vendored
2
.gitignore
vendored
@ -8,3 +8,5 @@ software/arduino/.cproject
|
||||
software/arduino/.project
|
||||
software/arduino/.settings/
|
||||
.vscode/
|
||||
|
||||
software/arduino/sim/sim
|
||||
|
@ -12,7 +12,7 @@
|
||||
#include "pins.h"
|
||||
|
||||
// Standad layer
|
||||
const char *keyConfig1 = "§12345"
|
||||
const char *keyConfig1 = "\6912345" // Fix this. Put in the right scancodes
|
||||
"\tQWERT"
|
||||
"\177ASDFG"
|
||||
"\129<ZXCV"
|
||||
@ -41,14 +41,14 @@ void changeColumnPin(size_t column) {
|
||||
void readRowPins(keyboard_state_t &keyboardState, size_t x) {
|
||||
for (size_t y = 0; y < height; ++y) {
|
||||
int value = digitalRead(yPins[y]);
|
||||
auto &keyState = keyboardState.state(x, y);
|
||||
auto &storedKeyState = keyboardState.state(x, y);
|
||||
|
||||
if (keyState != value) {
|
||||
if (storedKeyState != value) {
|
||||
Serial.print("readRowPins: key is changed ");
|
||||
Serial.print(x);
|
||||
Serial.print(y);
|
||||
keyboardMap.publishEvent(x, y, keyState);
|
||||
keyState = value;
|
||||
keyboardMap.publishEvent(x, y, value);
|
||||
storedKeyState = value;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Binary file not shown.
Loading…
x
Reference in New Issue
Block a user