diff --git a/TODO.md b/TODO.md index e3dac5a..7135b06 100644 --- a/TODO.md +++ b/TODO.md @@ -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 diff --git a/src/classes/Keyboard.cpp b/src/classes/Keyboard.cpp index 6eb2808..382f9cc 100644 --- a/src/classes/Keyboard.cpp +++ b/src/classes/Keyboard.cpp @@ -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;