patch k100 air
This commit is contained in:
@@ -1,5 +1,5 @@
|
||||
--- a/src/devices/k100airWU/k100airWU.go
|
||||
+++ b/src/devices/k100airWU/k100airWU.go
|
||||
--- a/src/devices/k100airWU/k100airWU.go 2026-06-13 21:26:01.000000000 -0600
|
||||
+++ b/src/devices/k100airWU/k100airWU.go 2026-06-18 13:03:58.116016558 -0600
|
||||
@@ -13,6 +13,7 @@
|
||||
"OpenLinkHub/src/keyboards"
|
||||
"OpenLinkHub/src/logger"
|
||||
@@ -32,15 +32,17 @@
|
||||
LEDChannels: 137,
|
||||
Layouts: keyboards.GetLayouts(keyboardKey),
|
||||
KeyAssignmentTypes: map[int]string{
|
||||
@@ -253,6 +257,7 @@
|
||||
d.setDeviceColor() // Device color
|
||||
d.setBrightnessLevel() // Brightness
|
||||
d.backendListener() // Control listener
|
||||
+ d.setupOpenRGBController() // OpenRGB Controller
|
||||
@@ -256,6 +260,9 @@
|
||||
d.setupClusterController() // RGB Cluster
|
||||
d.setupPerformance() // Performance
|
||||
d.setAutoBrightness() // Auto brightness
|
||||
@@ -411,7 +416,16 @@
|
||||
+ if d.DeviceProfile != nil && d.DeviceProfile.OpenRGBIntegration {
|
||||
+ d.setupOpenRGBController() // OpenRGB Controller
|
||||
+ }
|
||||
d.createDevice() // Device register
|
||||
logger.Log(logger.Fields{"serial": d.Serial, "product": d.Product}).Info("Device successfully initialized")
|
||||
|
||||
@@ -411,7 +418,16 @@
|
||||
|
||||
// getKeyData will return key data for given key hash
|
||||
func (d *Device) getKeyData(keyHash string) *keyboards.Key {
|
||||
@@ -58,7 +60,7 @@
|
||||
for _, key := range value.Keys {
|
||||
for _, hash := range key.KeyHash {
|
||||
if hash == keyHash {
|
||||
@@ -776,6 +790,7 @@
|
||||
@@ -776,6 +792,7 @@
|
||||
deviceProfile.LCDMode = d.DeviceProfile.LCDMode
|
||||
deviceProfile.LCDRotation = d.DeviceProfile.LCDRotation
|
||||
deviceProfile.RGBCluster = d.DeviceProfile.RGBCluster
|
||||
@@ -66,12 +68,14 @@
|
||||
deviceProfile.DisableAltTab = d.DeviceProfile.DisableAltTab
|
||||
deviceProfile.DisableAltF4 = d.DeviceProfile.DisableAltF4
|
||||
deviceProfile.DisableShiftTab = d.DeviceProfile.DisableShiftTab
|
||||
@@ -1153,11 +1168,65 @@
|
||||
@@ -1153,11 +1170,69 @@
|
||||
cluster.Get().AddDeviceController(clusterController)
|
||||
}
|
||||
|
||||
+// setupOpenRGBController will create RGBController object for OpenRGB Client Integration
|
||||
+func (d *Device) setupOpenRGBController() {
|
||||
+ openrgb.RemoveDeviceControllerBySerial(d.Serial)
|
||||
+
|
||||
+ controller := &common.OpenRGBController{
|
||||
+ Name: d.Product,
|
||||
+ Vendor: "Corsair",
|
||||
@@ -95,6 +99,7 @@
|
||||
+ },
|
||||
+ )
|
||||
+ openrgb.AddDeviceController(controller)
|
||||
+ openrgb.SendToOpenRGB()
|
||||
+}
|
||||
+
|
||||
+// ProcessSetOpenRgbIntegration will update OpenRGB integration status
|
||||
@@ -115,7 +120,8 @@
|
||||
+ if enabled {
|
||||
+ d.setupOpenRGBController()
|
||||
+ } else {
|
||||
+ openrgb.NotifyControllerChange(d.Serial)
|
||||
+ openrgb.RemoveDeviceControllerBySerial(d.Serial)
|
||||
+ openrgb.SendToOpenRGB()
|
||||
+ }
|
||||
+ d.setDeviceColor()
|
||||
+ return 1
|
||||
@@ -132,7 +138,7 @@
|
||||
|
||||
d.DeviceProfile.RGBCluster = enabled
|
||||
d.saveDeviceProfile() // Save profile
|
||||
@@ -1743,6 +1812,12 @@
|
||||
@@ -1743,6 +1818,12 @@
|
||||
return
|
||||
}
|
||||
|
||||
@@ -145,7 +151,7 @@
|
||||
// RGB Cluster
|
||||
if d.DeviceProfile.RGBCluster {
|
||||
logger.Log(logger.Fields{}).Info("Exiting setDeviceColor() due to RGB Cluster")
|
||||
@@ -2071,6 +2146,85 @@
|
||||
@@ -2071,6 +2152,85 @@
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -231,8 +237,8 @@
|
||||
|
||||
if d.DeviceProfile.Performance {
|
||||
buf[6] = 255
|
||||
--- a/web/k100airW.html
|
||||
+++ b/web/k100airW.html
|
||||
--- a/web/k100airW.html 2026-06-13 21:26:01.000000000 -0600
|
||||
+++ b/web/k100airW.html 2026-06-18 13:03:58.116981931 -0600
|
||||
@@ -148,6 +148,15 @@
|
||||
<span class="toggle-track"></span>
|
||||
</label>
|
||||
|
||||
Reference in New Issue
Block a user