mirror of
https://github.com/MatMoul/g810-led.git
synced 2026-03-25 08:04:25 +00:00
Add new arg -tuk for testing unsuported keyboard
This commit is contained in:
@@ -21,6 +21,15 @@ LedKeyboard::~LedKeyboard() {
|
||||
}
|
||||
|
||||
|
||||
bool LedKeyboard::overrideKeyboard(uint16_t vendorID, uint16_t productID, KeyboardModel model) {
|
||||
if(model==KeyboardModel::unknown) return false;
|
||||
SupportedKeyboards = {
|
||||
{ vendorID, productID, (u_int16_t)model }
|
||||
};
|
||||
return true;
|
||||
}
|
||||
|
||||
|
||||
vector<LedKeyboard::DeviceInfo> LedKeyboard::listKeyboards() {
|
||||
vector<LedKeyboard::DeviceInfo> deviceList;
|
||||
|
||||
|
||||
@@ -16,7 +16,7 @@ class LedKeyboard {
|
||||
|
||||
private:
|
||||
|
||||
const std::vector<std::vector<uint16_t>> SupportedKeyboards = {
|
||||
std::vector<std::vector<uint16_t>> SupportedKeyboards = {
|
||||
{ 0x46d, 0xc336, (u_int16_t)KeyboardModel::g213 },
|
||||
{ 0x46d, 0xc330, (u_int16_t)KeyboardModel::g410 },
|
||||
{ 0x46d, 0xc333, (u_int16_t)KeyboardModel::g610 },
|
||||
@@ -27,7 +27,6 @@ class LedKeyboard {
|
||||
{ 0x46d, 0xc335, (u_int16_t)KeyboardModel::g910 }
|
||||
};
|
||||
|
||||
|
||||
enum class KeyAddressGroup : uint8_t {
|
||||
logo = 0x00,
|
||||
indicators,
|
||||
@@ -135,6 +134,8 @@ class LedKeyboard {
|
||||
~LedKeyboard();
|
||||
|
||||
|
||||
bool overrideKeyboard(uint16_t vendorID, uint16_t productID, KeyboardModel model);
|
||||
|
||||
std::vector<DeviceInfo> listKeyboards();
|
||||
|
||||
bool isOpen();
|
||||
|
||||
Reference in New Issue
Block a user