mirror of
https://github.com/MatMoul/g810-led.git
synced 2024-12-23 09:16:11 +00:00
Update keywork count
This commit is contained in:
parent
23d5243ee4
commit
e3cebb2912
@ -592,17 +592,17 @@ bool Keyboard::setKeys(KeyValue keyValue[], int keyValueCount) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
bool Keyboard::setAllKeys(KeyColors colors) {
|
bool Keyboard::setAllKeys(KeyColors colors) {
|
||||||
KeyValue keyValues[118];
|
KeyValue keyValues[119];
|
||||||
for (int i = 0; i < 118; i++) {
|
for (int i = 0; i < 119; i++) {
|
||||||
getKeyAddress((Key)i, keyValues[i].key);
|
getKeyAddress((Key)i, keyValues[i].key);
|
||||||
keyValues[i].colors = colors;
|
keyValues[i].colors = colors;
|
||||||
}
|
}
|
||||||
setKeys(keyValues, 118);
|
setKeys(keyValues, 119);
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
bool Keyboard::setGroupKeys(KeyGroup keyGroup, KeyColors colors) {
|
bool Keyboard::setGroupKeys(KeyGroup keyGroup, KeyColors colors) {
|
||||||
KeyValue keyValues[118];
|
KeyValue keyValues[119];
|
||||||
int keyValuesCount = 0;
|
int keyValuesCount = 0;
|
||||||
switch (keyGroup) {
|
switch (keyGroup) {
|
||||||
case KeyGroup::logo:
|
case KeyGroup::logo:
|
||||||
@ -665,7 +665,7 @@ bool Keyboard::setGroupKeys(KeyGroup keyGroup, KeyColors colors) {
|
|||||||
setKeys(keyValues, keyValuesCount);
|
setKeys(keyValues, keyValuesCount);
|
||||||
break;
|
break;
|
||||||
case KeyGroup::keys:
|
case KeyGroup::keys:
|
||||||
for (int i = 63; i < 118; i++) {
|
for (int i = 63; i < 119; i++) {
|
||||||
getKeyAddress((Key)i, keyValues[i - 63].key);
|
getKeyAddress((Key)i, keyValues[i - 63].key);
|
||||||
keyValues[i - 63].colors = colors;
|
keyValues[i - 63].colors = colors;
|
||||||
keyValuesCount++;
|
keyValuesCount++;
|
||||||
|
@ -10,7 +10,7 @@ class Keyboard {
|
|||||||
|
|
||||||
enum class PowerOnEffect { rainbow, color };
|
enum class PowerOnEffect { rainbow, color };
|
||||||
enum class KeyAddressGroup { logo, indicators, multimedia, keys };
|
enum class KeyAddressGroup { logo, indicators, multimedia, keys };
|
||||||
enum class Key { // 118 items
|
enum class Key { // 119 items
|
||||||
logo,
|
logo,
|
||||||
caps, num, scroll, game, backlight,
|
caps, num, scroll, game, backlight,
|
||||||
mute, play, stop, prev, next,
|
mute, play, stop, prev, next,
|
||||||
|
Loading…
Reference in New Issue
Block a user