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

Filter numpad keys for g410

This commit is contained in:
MatMoul 2017-03-11 18:53:29 +01:00
parent d72e526ac9
commit 664f1346c7
2 changed files with 3 additions and 6 deletions

View File

@ -12,7 +12,6 @@
## Tasks (Assigned to MatMoul but you can participate) :
* (80%) Add MKeys led control support
* (70%) Avoid sending keys that not supported by a keyboard model
## Possible enhancements :
* Add deamon mode for custom effects

View File

@ -310,11 +310,9 @@ bool LedKeyboard::setKeys(KeyValueArray keyValues) {
if (SortedKeys[4].size() <= 120) SortedKeys[4].push_back(keyValues[i]);
break;
case LedKeyboard::KeyboardModel::g410:
// need filter num pad for G410
// if (SortedKeys[4].size() <= 120 && keyValues[i].key > 0x07 &&
// keyValues[i].key < 0x23)
// SortedKeys[4].push_back(keyValues[i]);
if (SortedKeys[4].size() <= 120) SortedKeys[4].push_back(keyValues[i]);
if (SortedKeys[4].size() <= 120)
if (keyValues[i].key < LedKeyboard::Key::num_lock || keyValues[i].key > LedKeyboard::Key::num_dot)
SortedKeys[4].push_back(keyValues[i]);
break;
default:
break;