There’s this test in the code:
for (int i = 0; i < rd / (int)sizeof(struct input_event); i++) {
if (ev[i].type == 1 && ev[i].code < sizeof(pressedScanCodes))
pressedScanCodes[ev[i].code] = ev[i].value;
}
The pressedScanCodes
is currently 256 bytes big, so this is one problem. We can bump it to a thousand no problem. Is the type on events 1
(and value 0/1 for released/pressed) ?