Don't exit early when encountering an empty slot in the report. There seem to

be keyboards that leave gaps. It's not really specified in the docs, they only
say that the ordering of keys is indetermined. So I guess intermixing empty
slots is equally valid.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@29106 a95241bf-73f2-0310-859d-f6bbb57e9c96
This commit is contained in:
Michael Lotz
2009-01-31 23:04:09 +00:00
parent 7c2cc28dc9
commit 3c33e2749f
@@ -324,7 +324,9 @@ KeyboardDevice::_InterpretBuffer()
uint8 *compare = fTransferBuffer; uint8 *compare = fTransferBuffer;
for (int32 twice = 0; twice < 2; twice++) { for (int32 twice = 0; twice < 2; twice++) {
for (size_t i = 2; i < fTotalReportSize; i++) { for (size_t i = 2; i < fTotalReportSize; i++) {
if (current[i] != 0x00 && current[i] != 0x01) { if (current[i] == 0x00 || current[i] == 0x01)
continue;
bool found = false; bool found = false;
for (size_t j = 2; j < fTotalReportSize; j++) { for (size_t j = 2; j < fTotalReportSize; j++) {
if (compare[j] == current[i]) { if (compare[j] == current[i]) {
@@ -367,8 +369,6 @@ KeyboardDevice::_InterpretBuffer()
fCurrentRepeatKey = 0; fCurrentRepeatKey = 0;
} }
} }
} else
break;
} }
current = fTransferBuffer; current = fTransferBuffer;