1
0
mirror of https://github.com/MatMoul/g810-led.git synced 2024-12-23 09:16:11 +00:00

Merge branch 'master' of github.com:MatMoul/g810-led

This commit is contained in:
MatMoul 2016-12-06 22:02:45 +01:00
commit bc3280f851

View File

@ -709,14 +709,16 @@ bool Keyboard::setKeys(KeyValue keyValue[], int keyValueCount) {
if (multimediaCount > 0) setKeysInternal(KeyAddressGroup::multimedia, multimedia, multimediaCount);
if (keysCount > 0) {
int maxKeyValueCount = 2; // Normally max 14 but dont work
int maxKeyValueCount = 14;
for (int i = 0; i < keysCount; i = i + maxKeyValueCount) {
KeyValue keysBlock[maxKeyValueCount];
int keysBlockCount = 0;
for (int j = 0; j < maxKeyValueCount; j++) {
if((i + j) < keysCount ) {
keysBlock[j] = keys[i + j];
keysBlockCount++;
}
}
setKeysInternal(KeyAddressGroup::keys, keysBlock, keysBlockCount);
}
}