diff --git a/src/classes/Keyboard.cpp b/src/classes/Keyboard.cpp index 2d209a4..c5acf2c 100644 --- a/src/classes/Keyboard.cpp +++ b/src/classes/Keyboard.cpp @@ -374,6 +374,7 @@ bool LedKeyboard::commit() { case KeyboardModel::g413: return true; // Keyboard is non-transactional case KeyboardModel::g410: + case KeyboardModel::g512: case KeyboardModel::g513: case KeyboardModel::g610: case KeyboardModel::g810: @@ -450,6 +451,7 @@ bool LedKeyboard::setKeys(KeyValueArray keyValues) { break; case LedKeyboard::KeyAddressGroup::keys: switch (currentDevice.model) { + case LedKeyboard::KeyboardModel::g512: case LedKeyboard::KeyboardModel::g513: case LedKeyboard::KeyboardModel::g610: case LedKeyboard::KeyboardModel::g810: @@ -594,6 +596,7 @@ bool LedKeyboard::setAllKeys(LedKeyboard::Color color) { NativeEffectStorage::none); return true; case KeyboardModel::g410: + case KeyboardModel::g512: case KeyboardModel::g513: case KeyboardModel::g610: case KeyboardModel::g810: @@ -762,6 +765,7 @@ bool LedKeyboard::setNativeEffect(NativeEffect effect, NativeEffectPart part, if (part == NativeEffectPart::logo) return true; //Does not have logo component break; case KeyboardModel::g410: + case KeyboardModel::g512: case KeyboardModel::g513: case KeyboardModel::g610: // Unconfirmed case KeyboardModel::g810: @@ -910,6 +914,7 @@ LedKeyboard::byte_buffer_t LedKeyboard::getKeyGroupAddress(LedKeyboard::KeyAddre case KeyboardModel::g413: return {}; // Device doesn't support per-key setting case KeyboardModel::g410: + case KeyboardModel::g512: case KeyboardModel::g513: case KeyboardModel::gpro: switch (keyAddressGroup) { diff --git a/src/classes/Keyboard.h b/src/classes/Keyboard.h index 74505e2..596716e 100644 --- a/src/classes/Keyboard.h +++ b/src/classes/Keyboard.h @@ -48,6 +48,7 @@ class LedKeyboard { { 0x46d, 0xc336, (uint16_t)KeyboardModel::g213 }, { 0x46d, 0xc330, (uint16_t)KeyboardModel::g410 }, { 0x46d, 0xc33a, (uint16_t)KeyboardModel::g413 }, + { 0x46d, 0xc342, (uint16_t)KeyboardModel::g512 }, { 0x46d, 0xc33c, (uint16_t)KeyboardModel::g513 }, { 0x46d, 0xc333, (uint16_t)KeyboardModel::g610 }, { 0x46d, 0xc338, (uint16_t)KeyboardModel::g610 }, @@ -64,6 +65,7 @@ class LedKeyboard { g213, g410, g413, + g512, g513, g610, g810, diff --git a/src/helpers/help.cpp b/src/helpers/help.cpp index f7f3a00..36548d1 100644 --- a/src/helpers/help.cpp +++ b/src/helpers/help.cpp @@ -32,6 +32,7 @@ namespace help { if(cmdName == "g213-led") return KeyboardFeatures::g213; else if(cmdName == "g410-led") return KeyboardFeatures::g410; else if(cmdName == "g413-led") return KeyboardFeatures::g413; + else if(cmdName == "g512-led") return KeyboardFeatures::g512; else if(cmdName == "g513-led") return KeyboardFeatures::g513; else if(cmdName == "g610-led") return KeyboardFeatures::g610; else if(cmdName == "g810-led") return KeyboardFeatures::g810; diff --git a/src/helpers/help.h b/src/helpers/help.h index fc710fa..f90058b 100644 --- a/src/helpers/help.h +++ b/src/helpers/help.h @@ -47,6 +47,7 @@ namespace help { g213 = rgb | logo1 | numpad | multimedia | setall | setregion | setindicators | poweronfx | userstoredlighting, g410 = rgb | commit | setall | setgroup | setkey | poweronfx | userstoredlighting, g413 = intensity | setall | userstoredlighting, + g512 = rgb | commit | numpad | setall | setgroup | setkey | setindicators | poweronfx | userstoredlighting, g513 = rgb | commit | numpad | setall | setgroup | setkey | setindicators | poweronfx | userstoredlighting, g610 = intensity | commit | logo1 | numpad | multimedia | setall | setgroup | setkey | setindicators | poweronfx | userstoredlighting, g810 = rgb | commit | logo1 | numpad | multimedia | setall | setgroup | setkey | setindicators | poweronfx, diff --git a/udev/g810-led.rules b/udev/g810-led.rules index 1757150..d123e18 100644 --- a/udev/g810-led.rules +++ b/udev/g810-led.rules @@ -1,6 +1,7 @@ ACTION=="add", SUBSYSTEMS=="usb", ATTRS{idVendor}=="046d", ATTRS{idProduct}=="c336", MODE="666" RUN+="/usr/bin/g213-led -p /etc/g810-led/profile" ACTION=="add", SUBSYSTEMS=="usb", ATTRS{idVendor}=="046d", ATTRS{idProduct}=="c330", MODE="666" RUN+="/usr/bin/g410-led -p /etc/g810-led/profile" ACTION=="add", SUBSYSTEMS=="usb", ATTRS{idVendor}=="046d", ATTRS{idProduct}=="c33a", MODE="666" RUN+="/usr/bin/g413-led -p /etc/g810-led/profile" +ACTION=="add", SUBSYSTEMS=="usb", ATTRS{idVendor}=="046d", ATTRS{idProduct}=="c342", MODE="666" RUN+="/usr/bin/g512-led -p /etc/g810-led/profile" ACTION=="add", SUBSYSTEMS=="usb", ATTRS{idVendor}=="046d", ATTRS{idProduct}=="c33c", MODE="666" RUN+="/usr/bin/g513-led -p /etc/g810-led/profile" ACTION=="add", SUBSYSTEMS=="usb", ATTRS{idVendor}=="046d", ATTRS{idProduct}=="c333", MODE="666" RUN+="/usr/bin/g610-led -p /etc/g810-led/profile" ACTION=="add", SUBSYSTEMS=="usb", ATTRS{idVendor}=="046d", ATTRS{idProduct}=="c338", MODE="666" RUN+="/usr/bin/g610-led -p /etc/g810-led/profile" @@ -12,6 +13,7 @@ ACTION=="add", SUBSYSTEMS=="usb", ATTRS{idVendor}=="046d", ATTRS{idProduct}=="c3 ACTION=="add", SUBSYSTEM=="usb", ATTRS{idVendor}=="046d", ATTRS{idProduct}=="c336", MODE="666" RUN+="/usr/bin/g213-led -p /etc/g810-led/profile" ACTION=="add", SUBSYSTEM=="usb", ATTRS{idVendor}=="046d", ATTRS{idProduct}=="c330", MODE="666" RUN+="/usr/bin/g410-led -p /etc/g810-led/profile" ACTION=="add", SUBSYSTEM=="usb", ATTRS{idVendor}=="046d", ATTRS{idProduct}=="c33a", MODE="666" RUN+="/usr/bin/g413-led -p /etc/g810-led/profile" +ACTION=="add", SUBSYSTEM=="usb", ATTRS{idVendor}=="046d", ATTRS{idProduct}=="c342", MODE="666" RUN+="/usr/bin/g512-led -p /etc/g810-led/profile" ACTION=="add", SUBSYSTEM=="usb", ATTRS{idVendor}=="046d", ATTRS{idProduct}=="c33c", MODE="666" RUN+="/usr/bin/g513-led -p /etc/g810-led/profile" ACTION=="add", SUBSYSTEM=="usb", ATTRS{idVendor}=="046d", ATTRS{idProduct}=="c333", MODE="666" RUN+="/usr/bin/g610-led -p /etc/g810-led/profile" ACTION=="add", SUBSYSTEM=="usb", ATTRS{idVendor}=="046d", ATTRS{idProduct}=="c338", MODE="666" RUN+="/usr/bin/g610-led -p /etc/g810-led/profile"