Skip to content

Commit cf1cb4a

Browse files
committed
Fix - Updated constructor of LogitechPerKeyRGBDevice to initialise LED layout (using AddLed() with placeholder grid layout) so all per-key Logitech keyboards report their LEDs.
1 parent b0acc61 commit cf1cb4a

1 file changed

Lines changed: 12 additions & 1 deletion

File tree

RGB.NET.Devices.Logitech/PerKey/LogitechPerKeyRGBDevice.cs

Lines changed: 12 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,14 +24,25 @@ internal LogitechPerKeyRGBDevice(LogitechRGBDeviceInfo info, IUpdateQueue update
2424
: base(info, updateQueue)
2525
{
2626
this._ledMapping = ledMapping;
27+
28+
InitializeLayout();
2729
}
2830

2931
#endregion
3032

3133
#region Methods
3234

35+
private void InitializeLayout()
36+
{
37+
foreach ((LedId ledId, LogitechLedId mapping) in _ledMapping)
38+
{
39+
// TODO: Impove layout (curently places them in a grid)
40+
AddLed(ledId, new Point(0, 0), new Size(10, 10));
41+
}
42+
}
43+
3344
/// <inheritdoc />
3445
protected override object GetLedCustomData(LedId ledId) => _ledMapping.TryGetValue(ledId, out LogitechLedId logitechLedId) ? logitechLedId : -1;
35-
46+
3647
#endregion
3748
}

0 commit comments

Comments
 (0)