1
0
mirror of https://github.com/DarthAffe/RGB.NET.git synced 2025-12-13 01:58:30 +00:00

Merge pull request #39 from DarthAffe/SDK/CoolerMaster

Updated CoolerMaster-SDK
This commit is contained in:
DarthAffe 2019-01-13 14:52:54 +01:00 committed by GitHub
commit 7e1c89bf3c
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
11 changed files with 911 additions and 36 deletions

View File

@ -10,7 +10,7 @@ If you want to help with layouting/testing devices or if you need support using
This is the easiest and therefore preferred way to include RGB.NET in your project. This is the easiest and therefore preferred way to include RGB.NET in your project.
Since there aren't any release-packages right now you'll have to use the CI-feed from [http://nuget.arge.be](http://nuget.arge.be). Since there aren't any release-packages right now you'll have to use the CI-feed from [http://nuget.arge.be](http://nuget.arge.be).
You can include it either by adding ```http://nuget.arge.be/v3/index.json``` to your Visual Studio package sources or by adding this [https://github.com/DarthAffe/RGB.NET/tree/master/Documentation/NuGet.Config](NuGet.Config) to your project (at the same level as your solution). You can include it either by adding ```http://nuget.arge.be/v3/index.json``` to your Visual Studio package sources or by adding this [NuGet.Config](https://github.com/DarthAffe/RGB.NET/tree/master/Documentation/NuGet.Config) to your project (at the same level as your solution).
### Example usage of RGB.NET ### Example usage of RGB.NET
@ -18,4 +18,4 @@ You can include it either by adding ```http://nuget.arge.be/v3/index.json``` to
#### Example Projects #### Example Projects
[https://github.com/DarthAffe/KeyboardAudioVisualizer](https://github.com/DarthAffe/KeyboardAudioVisualizer) [https://github.com/DarthAffe/KeyboardAudioVisualizer](https://github.com/DarthAffe/KeyboardAudioVisualizer)
[https://github.com/DarthAffe/RGBSyncPlus](https://github.com/DarthAffe/RGBSyncPlus) [https://github.com/DarthAffe/RGBSyncPlus](https://github.com/DarthAffe/RGBSyncPlus)

View File

@ -104,20 +104,20 @@ namespace RGB.NET.Devices.CoolerMaster
foreach (CoolerMasterDevicesIndexes index in Enum.GetValues(typeof(CoolerMasterDevicesIndexes))) foreach (CoolerMasterDevicesIndexes index in Enum.GetValues(typeof(CoolerMasterDevicesIndexes)))
{ {
try try
{ {
_CoolerMasterSDK.SetControlDevice(index); RGBDeviceType deviceType = index.GetDeviceType();
if (_CoolerMasterSDK.IsDevicePlugged()) if (deviceType == RGBDeviceType.None) continue;
if (_CoolerMasterSDK.IsDevicePlugged(index))
{ {
RGBDeviceType deviceType = index.GetDeviceType();
if (!loadFilter.HasFlag(deviceType)) continue; if (!loadFilter.HasFlag(deviceType)) continue;
ICoolerMasterRGBDevice device; ICoolerMasterRGBDevice device;
switch (deviceType) switch (deviceType)
{ {
case RGBDeviceType.Keyboard: case RGBDeviceType.Keyboard:
CoolerMasterPhysicalKeyboardLayout physicalLayout = _CoolerMasterSDK.GetDeviceLayout(); CoolerMasterPhysicalKeyboardLayout physicalLayout = _CoolerMasterSDK.GetDeviceLayout(index);
device = new CoolerMasterKeyboardRGBDevice(new CoolerMasterKeyboardRGBDeviceInfo(index, physicalLayout, GetCulture())); device = new CoolerMasterKeyboardRGBDevice(new CoolerMasterKeyboardRGBDeviceInfo(index, physicalLayout, GetCulture()));
break; break;
@ -132,7 +132,7 @@ namespace RGB.NET.Devices.CoolerMaster
continue; continue;
} }
_CoolerMasterSDK.EnableLedControl(true); _CoolerMasterSDK.EnableLedControl(true, index);
device.Initialize(UpdateTrigger); device.Initialize(UpdateTrigger);
devices.Add(device); devices.Add(device);
@ -165,9 +165,8 @@ namespace RGB.NET.Devices.CoolerMaster
try try
{ {
CoolerMasterRGBDeviceInfo deviceInfo = (CoolerMasterRGBDeviceInfo)device.DeviceInfo; CoolerMasterRGBDeviceInfo deviceInfo = (CoolerMasterRGBDeviceInfo)device.DeviceInfo;
_CoolerMasterSDK.SetControlDevice(deviceInfo.DeviceIndex); _CoolerMasterSDK.EnableLedControl(false, deviceInfo.DeviceIndex);
_CoolerMasterSDK.EnableLedControl(false); _CoolerMasterSDK.EnableLedControl(true, deviceInfo.DeviceIndex);
_CoolerMasterSDK.EnableLedControl(true);
} }
catch {/* shit happens */} catch {/* shit happens */}
} }
@ -182,8 +181,7 @@ namespace RGB.NET.Devices.CoolerMaster
try try
{ {
CoolerMasterRGBDeviceInfo deviceInfo = (CoolerMasterRGBDeviceInfo)device.DeviceInfo; CoolerMasterRGBDeviceInfo deviceInfo = (CoolerMasterRGBDeviceInfo)device.DeviceInfo;
_CoolerMasterSDK.SetControlDevice(deviceInfo.DeviceIndex); _CoolerMasterSDK.EnableLedControl(false, deviceInfo.DeviceIndex);
_CoolerMasterSDK.EnableLedControl(false);
} }
catch {/* shit happens */} catch {/* shit happens */}
} }

View File

@ -43,6 +43,33 @@ namespace RGB.NET.Devices.CoolerMaster
[Description("MasterKeys Pro S White")] [Description("MasterKeys Pro S White")]
[DeviceType(RGBDeviceType.Keyboard)] [DeviceType(RGBDeviceType.Keyboard)]
MasterKeys_S_White = 7 MasterKeys_S_White = 7,
[Description("MM520")]
[DeviceType(RGBDeviceType.Mouse)]
MM520 = 8,
[Description("MM530")]
[DeviceType(RGBDeviceType.Mouse)]
MM530 = 9,
[Description("MasterKeys MK750")]
[DeviceType(RGBDeviceType.Keyboard)]
MasterKeys_MK750 = 10,
[Description("CK372")]
[DeviceType(RGBDeviceType.Keyboard)]
CK372 = 11,
[Description("CK550")]
[DeviceType(RGBDeviceType.Keyboard)]
CK550 = 12,
[Description("CK551")]
[DeviceType(RGBDeviceType.Keyboard)]
CK551 = 13,
[DeviceType(RGBDeviceType.None)]
Default = 0xFFFF
} }
} }

View File

@ -25,6 +25,12 @@ namespace RGB.NET.Devices.CoolerMaster
Spectrum = 11, Spectrum = 11,
RapidFire = 12, RapidFire = 12,
Indicator = 13, //mouse Effect Indicator = 13, //mouse Effect
FireBall = 14,
WaterRipple = 15,
ReactivePunch = 16,
Snowing = 17,
HeartBeat = 18,
ReactiveTornade = 19,
Multi1 = 0xE0, Multi1 = 0xE0,
Multi2 = 0xE1, Multi2 = 0xE1,

View File

@ -12,6 +12,7 @@ namespace RGB.NET.Devices.CoolerMaster
{ {
UNINIT = 0, UNINIT = 0,
US = 1, US = 1,
EU = 2 EU = 2,
JP = 3
} }
} }

View File

@ -74,8 +74,7 @@ namespace RGB.NET.Devices.CoolerMaster
/// <inheritdoc cref="AbstractRGBDevice{TDeviceInfo}.Dispose" /> /// <inheritdoc cref="AbstractRGBDevice{TDeviceInfo}.Dispose" />
public override void Dispose() public override void Dispose()
{ {
_CoolerMasterSDK.SetControlDevice(DeviceInfo.DeviceIndex); _CoolerMasterSDK.EnableLedControl(false, DeviceInfo.DeviceIndex);
_CoolerMasterSDK.EnableLedControl(false);
base.Dispose(); base.Dispose();
} }

View File

@ -36,15 +36,13 @@ namespace RGB.NET.Devices.CoolerMaster
/// <inheritdoc /> /// <inheritdoc />
protected override void Update(Dictionary<object, Color> dataSet) protected override void Update(Dictionary<object, Color> dataSet)
{ {
_CoolerMasterSDK.SetControlDevice(_deviceIndex);
foreach (KeyValuePair<object, Color> data in dataSet) foreach (KeyValuePair<object, Color> data in dataSet)
{ {
(int row, int column) = ((int, int))data.Key; (int row, int column) = ((int, int))data.Key;
_CoolerMasterSDK.SetLedColor(row, column, data.Value.R, data.Value.G, data.Value.B); _CoolerMasterSDK.SetLedColor(row, column, data.Value.R, data.Value.G, data.Value.B, _deviceIndex);
} }
_CoolerMasterSDK.RefreshLed(false); _CoolerMasterSDK.RefreshLed(false, _deviceIndex);
} }
#endregion #endregion

View File

@ -655,6 +655,797 @@ namespace RGB.NET.Devices.CoolerMaster
#endregion #endregion
#region MasterKeysMK750
private static readonly Dictionary<LedId, (int row, int column)> MasterKeysMK750_US = new Dictionary<LedId, (int row, int column)>
{
{ LedId.Keyboard_Escape, (0,0) },
{ LedId.Keyboard_F1, (0,1) },
{ LedId.Keyboard_F2, (0,2) },
{ LedId.Keyboard_F3, (0,3) },
{ LedId.Keyboard_F4, (0,4) },
{ LedId.Keyboard_F5, (0,6) },
{ LedId.Keyboard_F6, (0,7) },
{ LedId.Keyboard_F7, (0,8) },
{ LedId.Keyboard_F8, (0,9) },
{ LedId.Keyboard_F9, (0,11) },
{ LedId.Keyboard_F10, (0,12) },
{ LedId.Keyboard_F11, (0,13) },
{ LedId.Keyboard_F12, (0,14) },
{ LedId.Keyboard_PrintScreen, (0,15) },
{ LedId.Keyboard_ScrollLock, (0,16) },
{ LedId.Keyboard_PauseBreak, (0,17) },
{ LedId.Keyboard_Programmable1, (0,18) },
{ LedId.Keyboard_Programmable2, (0,19) },
{ LedId.Keyboard_Programmable3, (0,20) },
{ LedId.Keyboard_Programmable4, (0,21) },
{ LedId.Keyboard_Custom1, (0,22) },
{ LedId.Keyboard_Custom23, (0,23) },
{ LedId.Keyboard_GraveAccentAndTilde, (1,0) },
{ LedId.Keyboard_1, (1,1) },
{ LedId.Keyboard_2, (1,2) },
{ LedId.Keyboard_3, (1,3) },
{ LedId.Keyboard_4, (1,4) },
{ LedId.Keyboard_5, (1,5) },
{ LedId.Keyboard_6, (1,6) },
{ LedId.Keyboard_7, (1,7) },
{ LedId.Keyboard_8, (1,8) },
{ LedId.Keyboard_9, (1,9) },
{ LedId.Keyboard_0, (1,10) },
{ LedId.Keyboard_MinusAndUnderscore, (1,11) },
{ LedId.Keyboard_EqualsAndPlus, (1,12) },
{ LedId.Keyboard_Backspace, (1,14) },
{ LedId.Keyboard_Insert, (1,15) },
{ LedId.Keyboard_Home, (1,16) },
{ LedId.Keyboard_PageUp, (1,17) },
{ LedId.Keyboard_NumLock, (1,18) },
{ LedId.Keyboard_NumSlash, (1,19) },
{ LedId.Keyboard_NumAsterisk, (1,20) },
{ LedId.Keyboard_NumMinus, (1,21) },
{ LedId.Keyboard_Custom2, (1,22) },
{ LedId.Keyboard_Custom24, (1,23) },
{ LedId.Keyboard_Tab, (2,0) },
{ LedId.Keyboard_Q, (2,1) },
{ LedId.Keyboard_W, (2,2) },
{ LedId.Keyboard_E, (2,3) },
{ LedId.Keyboard_R, (2,4) },
{ LedId.Keyboard_T, (2,5) },
{ LedId.Keyboard_Y, (2,6) },
{ LedId.Keyboard_U, (2,7) },
{ LedId.Keyboard_I, (2,8) },
{ LedId.Keyboard_O, (2,9) },
{ LedId.Keyboard_P, (2,10) },
{ LedId.Keyboard_BracketLeft, (2,11) },
{ LedId.Keyboard_BracketRight, (2,12) },
{ LedId.Keyboard_Backslash, (2,14) },
{ LedId.Keyboard_Delete, (2,15) },
{ LedId.Keyboard_End, (2,16) },
{ LedId.Keyboard_PageDown, (2,17) },
{ LedId.Keyboard_Num7, (2,18) },
{ LedId.Keyboard_Num8, (2,19) },
{ LedId.Keyboard_Num9, (2,20) },
{ LedId.Keyboard_NumPlus, (2,21) },
{ LedId.Keyboard_Custom3, (2,22) },
{ LedId.Keyboard_Custom25, (2,23) },
{ LedId.Keyboard_CapsLock, (3,0) },
{ LedId.Keyboard_A, (3,1) },
{ LedId.Keyboard_S, (3,2) },
{ LedId.Keyboard_D, (3,3) },
{ LedId.Keyboard_F, (3,4) },
{ LedId.Keyboard_G, (3,5) },
{ LedId.Keyboard_H, (3,6) },
{ LedId.Keyboard_J, (3,7) },
{ LedId.Keyboard_K, (3,8) },
{ LedId.Keyboard_L, (3,9) },
{ LedId.Keyboard_SemicolonAndColon, (3,10) },
{ LedId.Keyboard_ApostropheAndDoubleQuote, (3,11) },
{ LedId.Keyboard_Enter, (3,14) },
{ LedId.Keyboard_Num4, (3,18) },
{ LedId.Keyboard_Num5, (3,19) },
{ LedId.Keyboard_Num6, (3,20) },
{ LedId.Keyboard_Custom4, (3,22) },
{ LedId.Keyboard_Custom26, (3,23) },
{ LedId.Keyboard_LeftShift, (4,0) },
{ LedId.Keyboard_Z, (4,2) },
{ LedId.Keyboard_X, (4,3) },
{ LedId.Keyboard_C, (4,4) },
{ LedId.Keyboard_V, (4,5) },
{ LedId.Keyboard_B, (4,6) },
{ LedId.Keyboard_N, (4,7) },
{ LedId.Keyboard_M, (4,8) },
{ LedId.Keyboard_CommaAndLessThan, (4,9) },
{ LedId.Keyboard_PeriodAndBiggerThan, (4,10) },
{ LedId.Keyboard_SlashAndQuestionMark, (4,11) },
{ LedId.Keyboard_RightShift, (4,14) },
{ LedId.Keyboard_ArrowUp, (4,16) },
{ LedId.Keyboard_Num1, (4,18) },
{ LedId.Keyboard_Num2, (4,19) },
{ LedId.Keyboard_Num3, (4,20) },
{ LedId.Keyboard_NumEnter, (4,21) },
{ LedId.Keyboard_LeftCtrl, (5,0) },
{ LedId.Keyboard_LeftGui, (5,1) },
{ LedId.Keyboard_LeftAlt, (5,2) },
{ LedId.Keyboard_Space, (5,6) },
{ LedId.Keyboard_RightAlt, (5,10) },
{ LedId.Keyboard_RightGui, (5,11) },
{ LedId.Keyboard_Application, (5,12) },
{ LedId.Keyboard_RightCtrl, (5,14) },
{ LedId.Keyboard_ArrowLeft, (5,15) },
{ LedId.Keyboard_ArrowDown, (5,16) },
{ LedId.Keyboard_ArrowRight, (5,17) },
{ LedId.Keyboard_Num0, (5,18) },
{ LedId.Keyboard_NumPeriodAndDelete, (5,20) },
{ LedId.Keyboard_Custom5, (6,0) },
{ LedId.Keyboard_Custom6, (6,1) },
{ LedId.Keyboard_Custom7, (6,2) },
{ LedId.Keyboard_Custom8, (6,3) },
{ LedId.Keyboard_Custom9, (6,4) },
{ LedId.Keyboard_Custom10, (6,5) },
{ LedId.Keyboard_Custom11, (6,6) },
{ LedId.Keyboard_Custom12, (6,7) },
{ LedId.Keyboard_Custom13, (6,8) },
{ LedId.Keyboard_Custom14, (6,9) },
{ LedId.Keyboard_Custom15, (6,10) },
{ LedId.Keyboard_Custom16, (6,11) },
{ LedId.Keyboard_Custom17, (6,12) },
{ LedId.Keyboard_Custom18, (6,13) },
{ LedId.Keyboard_Custom19, (6,14) },
{ LedId.Keyboard_Custom20, (6,15) },
{ LedId.Keyboard_Custom21, (6,16) },
{ LedId.Keyboard_Custom22, (6,17) },
};
private static readonly Dictionary<LedId, (int row, int column)> MasterKeysMK750_EU = new Dictionary<LedId, (int row, int column)>
{
{ LedId.Keyboard_Escape, (0,0) },
{ LedId.Keyboard_F1, (0,1) },
{ LedId.Keyboard_F2, (0,2) },
{ LedId.Keyboard_F3, (0,3) },
{ LedId.Keyboard_F4, (0,4) },
{ LedId.Keyboard_F5, (0,6) },
{ LedId.Keyboard_F6, (0,7) },
{ LedId.Keyboard_F7, (0,8) },
{ LedId.Keyboard_F8, (0,9) },
{ LedId.Keyboard_F9, (0,11) },
{ LedId.Keyboard_F10, (0,12) },
{ LedId.Keyboard_F11, (0,13) },
{ LedId.Keyboard_F12, (0,14) },
{ LedId.Keyboard_PrintScreen, (0,15) },
{ LedId.Keyboard_ScrollLock, (0,16) },
{ LedId.Keyboard_PauseBreak, (0,17) },
{ LedId.Keyboard_Programmable1, (0,18) },
{ LedId.Keyboard_Programmable2, (0,19) },
{ LedId.Keyboard_Programmable3, (0,20) },
{ LedId.Keyboard_Programmable4, (0,21) },
{ LedId.Keyboard_Custom1, (0,22) },
{ LedId.Keyboard_Custom23, (0,23) },
{ LedId.Keyboard_GraveAccentAndTilde, (1,0) },
{ LedId.Keyboard_1, (1,1) },
{ LedId.Keyboard_2, (1,2) },
{ LedId.Keyboard_3, (1,3) },
{ LedId.Keyboard_4, (1,4) },
{ LedId.Keyboard_5, (1,5) },
{ LedId.Keyboard_6, (1,6) },
{ LedId.Keyboard_7, (1,7) },
{ LedId.Keyboard_8, (1,8) },
{ LedId.Keyboard_9, (1,9) },
{ LedId.Keyboard_0, (1,10) },
{ LedId.Keyboard_MinusAndUnderscore, (1,11) },
{ LedId.Keyboard_EqualsAndPlus, (1,12) },
{ LedId.Keyboard_Backspace, (1,14) },
{ LedId.Keyboard_Insert, (1,15) },
{ LedId.Keyboard_Home, (1,16) },
{ LedId.Keyboard_PageUp, (1,17) },
{ LedId.Keyboard_NumLock, (1,18) },
{ LedId.Keyboard_NumSlash, (1,19) },
{ LedId.Keyboard_NumAsterisk, (1,20) },
{ LedId.Keyboard_NumMinus, (1,21) },
{ LedId.Keyboard_Custom2, (1,22) },
{ LedId.Keyboard_Custom24, (1,23) },
{ LedId.Keyboard_Tab, (2,0) },
{ LedId.Keyboard_Q, (2,1) },
{ LedId.Keyboard_W, (2,2) },
{ LedId.Keyboard_E, (2,3) },
{ LedId.Keyboard_R, (2,4) },
{ LedId.Keyboard_T, (2,5) },
{ LedId.Keyboard_Y, (2,6) },
{ LedId.Keyboard_U, (2,7) },
{ LedId.Keyboard_I, (2,8) },
{ LedId.Keyboard_O, (2,9) },
{ LedId.Keyboard_P, (2,10) },
{ LedId.Keyboard_BracketLeft, (2,11) },
{ LedId.Keyboard_BracketRight, (2,12) },
{ LedId.Keyboard_Enter, (2,14) },
{ LedId.Keyboard_Delete, (2,15) },
{ LedId.Keyboard_End, (2,16) },
{ LedId.Keyboard_PageDown, (2,17) },
{ LedId.Keyboard_Num7, (2,18) },
{ LedId.Keyboard_Num8, (2,19) },
{ LedId.Keyboard_Num9, (2,20) },
{ LedId.Keyboard_NumPlus, (2,21) },
{ LedId.Keyboard_Custom3, (2,22) },
{ LedId.Keyboard_Custom25, (2,23) },
{ LedId.Keyboard_CapsLock, (3,0) },
{ LedId.Keyboard_A, (3,1) },
{ LedId.Keyboard_S, (3,2) },
{ LedId.Keyboard_D, (3,3) },
{ LedId.Keyboard_F, (3,4) },
{ LedId.Keyboard_G, (3,5) },
{ LedId.Keyboard_H, (3,6) },
{ LedId.Keyboard_J, (3,7) },
{ LedId.Keyboard_K, (3,8) },
{ LedId.Keyboard_L, (3,9) },
{ LedId.Keyboard_SemicolonAndColon, (3,10) },
{ LedId.Keyboard_ApostropheAndDoubleQuote, (3,11) },
{ LedId.Keyboard_NonUsTilde, (3,12) },
{ LedId.Keyboard_Num4, (3,18) },
{ LedId.Keyboard_Num5, (3,19) },
{ LedId.Keyboard_Num6, (3,20) },
{ LedId.Keyboard_Custom4, (3,22) },
{ LedId.Keyboard_Custom26, (3,23) },
{ LedId.Keyboard_LeftShift, (4,0) },
{ LedId.Keyboard_NonUsBackslash, (4,1) },
{ LedId.Keyboard_Z, (4,2) },
{ LedId.Keyboard_X, (4,3) },
{ LedId.Keyboard_C, (4,4) },
{ LedId.Keyboard_V, (4,5) },
{ LedId.Keyboard_B, (4,6) },
{ LedId.Keyboard_N, (4,7) },
{ LedId.Keyboard_M, (4,8) },
{ LedId.Keyboard_CommaAndLessThan, (4,9) },
{ LedId.Keyboard_PeriodAndBiggerThan, (4,10) },
{ LedId.Keyboard_SlashAndQuestionMark, (4,11) },
{ LedId.Keyboard_RightShift, (4,14) },
{ LedId.Keyboard_ArrowUp, (4,16) },
{ LedId.Keyboard_Num1, (4,18) },
{ LedId.Keyboard_Num2, (4,19) },
{ LedId.Keyboard_Num3, (4,20) },
{ LedId.Keyboard_NumEnter, (4,21) },
{ LedId.Keyboard_LeftCtrl, (5,0) },
{ LedId.Keyboard_LeftGui, (5,1) },
{ LedId.Keyboard_LeftAlt, (5,2) },
{ LedId.Keyboard_Space, (5,6) },
{ LedId.Keyboard_RightAlt, (5,10) },
{ LedId.Keyboard_RightGui, (5,11) },
{ LedId.Keyboard_Application, (5,12) },
{ LedId.Keyboard_RightCtrl, (5,14) },
{ LedId.Keyboard_ArrowLeft, (5,15) },
{ LedId.Keyboard_ArrowDown, (5,16) },
{ LedId.Keyboard_ArrowRight, (5,17) },
{ LedId.Keyboard_Num0, (5,18) },
{ LedId.Keyboard_NumPeriodAndDelete, (5,20) },
{ LedId.Keyboard_Custom5, (6,0) },
{ LedId.Keyboard_Custom6, (6,1) },
{ LedId.Keyboard_Custom7, (6,2) },
{ LedId.Keyboard_Custom8, (6,3) },
{ LedId.Keyboard_Custom9, (6,4) },
{ LedId.Keyboard_Custom10, (6,5) },
{ LedId.Keyboard_Custom11, (6,6) },
{ LedId.Keyboard_Custom12, (6,7) },
{ LedId.Keyboard_Custom13, (6,8) },
{ LedId.Keyboard_Custom14, (6,9) },
{ LedId.Keyboard_Custom15, (6,10) },
{ LedId.Keyboard_Custom16, (6,11) },
{ LedId.Keyboard_Custom17, (6,12) },
{ LedId.Keyboard_Custom18, (6,13) },
{ LedId.Keyboard_Custom19, (6,14) },
{ LedId.Keyboard_Custom20, (6,15) },
{ LedId.Keyboard_Custom21, (6,16) },
{ LedId.Keyboard_Custom22, (6,17) }
};
private static readonly Dictionary<LedId, (int row, int column)> MasterKeysMK750_JP = new Dictionary<LedId, (int row, int column)>
{
{ LedId.Keyboard_Escape, (0,0) },
{ LedId.Keyboard_F1, (0,1) },
{ LedId.Keyboard_F2, (0,2) },
{ LedId.Keyboard_F3, (0,3) },
{ LedId.Keyboard_F4, (0,4) },
{ LedId.Keyboard_F5, (0,6) },
{ LedId.Keyboard_F6, (0,7) },
{ LedId.Keyboard_F7, (0,8) },
{ LedId.Keyboard_F8, (0,9) },
{ LedId.Keyboard_F9, (0,11) },
{ LedId.Keyboard_F10, (0,12) },
{ LedId.Keyboard_F11, (0,13) },
{ LedId.Keyboard_F12, (0,14) },
{ LedId.Keyboard_PrintScreen, (0,15) },
{ LedId.Keyboard_ScrollLock, (0,16) },
{ LedId.Keyboard_PauseBreak, (0,17) },
{ LedId.Keyboard_Programmable1, (0,18) },
{ LedId.Keyboard_Programmable2, (0,19) },
{ LedId.Keyboard_Programmable3, (0,20) },
{ LedId.Keyboard_Programmable4, (0,21) },
{ LedId.Keyboard_Custom1, (0,22) },
{ LedId.Keyboard_Custom23, (0,23) },
{ LedId.Keyboard_GraveAccentAndTilde, (1,0) },
{ LedId.Keyboard_1, (1,1) },
{ LedId.Keyboard_2, (1,2) },
{ LedId.Keyboard_3, (1,3) },
{ LedId.Keyboard_4, (1,4) },
{ LedId.Keyboard_5, (1,5) },
{ LedId.Keyboard_6, (1,6) },
{ LedId.Keyboard_7, (1,7) },
{ LedId.Keyboard_8, (1,8) },
{ LedId.Keyboard_9, (1,9) },
{ LedId.Keyboard_0, (1,10) },
{ LedId.Keyboard_MinusAndUnderscore, (1,11) },
{ LedId.Keyboard_EqualsAndPlus, (1,12) },
{ LedId.Keyboard_International1, (1,13) },
{ LedId.Keyboard_Backspace, (1,14) },
{ LedId.Keyboard_Insert, (1,15) },
{ LedId.Keyboard_Home, (1,16) },
{ LedId.Keyboard_PageUp, (1,17) },
{ LedId.Keyboard_NumLock, (1,18) },
{ LedId.Keyboard_NumSlash, (1,19) },
{ LedId.Keyboard_NumAsterisk, (1,20) },
{ LedId.Keyboard_NumMinus, (1,21) },
{ LedId.Keyboard_Custom2, (1,22) },
{ LedId.Keyboard_Custom24, (1,23) },
{ LedId.Keyboard_Tab, (2,0) },
{ LedId.Keyboard_Q, (2,1) },
{ LedId.Keyboard_W, (2,2) },
{ LedId.Keyboard_E, (2,3) },
{ LedId.Keyboard_R, (2,4) },
{ LedId.Keyboard_T, (2,5) },
{ LedId.Keyboard_Y, (2,6) },
{ LedId.Keyboard_U, (2,7) },
{ LedId.Keyboard_I, (2,8) },
{ LedId.Keyboard_O, (2,9) },
{ LedId.Keyboard_P, (2,10) },
{ LedId.Keyboard_BracketLeft, (2,11) },
{ LedId.Keyboard_BracketRight, (2,12) },
{ LedId.Keyboard_Enter, (2,14) },
{ LedId.Keyboard_Delete, (2,15) },
{ LedId.Keyboard_End, (2,16) },
{ LedId.Keyboard_PageDown, (2,17) },
{ LedId.Keyboard_Num7, (2,18) },
{ LedId.Keyboard_Num8, (2,19) },
{ LedId.Keyboard_Num9, (2,20) },
{ LedId.Keyboard_NumPlus, (2,21) },
{ LedId.Keyboard_Custom3, (2,22) },
{ LedId.Keyboard_Custom25, (2,23) },
{ LedId.Keyboard_CapsLock, (3,0) },
{ LedId.Keyboard_A, (3,1) },
{ LedId.Keyboard_S, (3,2) },
{ LedId.Keyboard_D, (3,3) },
{ LedId.Keyboard_F, (3,4) },
{ LedId.Keyboard_G, (3,5) },
{ LedId.Keyboard_H, (3,6) },
{ LedId.Keyboard_J, (3,7) },
{ LedId.Keyboard_K, (3,8) },
{ LedId.Keyboard_L, (3,9) },
{ LedId.Keyboard_SemicolonAndColon, (3,10) },
{ LedId.Keyboard_ApostropheAndDoubleQuote, (3,11) },
{ LedId.Keyboard_Backslash, (3,14) },
{ LedId.Keyboard_Num4, (3,18) },
{ LedId.Keyboard_Num5, (3,19) },
{ LedId.Keyboard_Num6, (3,20) },
{ LedId.Keyboard_Custom4, (3,22) },
{ LedId.Keyboard_Custom26, (3,23) },
{ LedId.Keyboard_LeftShift, (4,0) },
{ LedId.Keyboard_Z, (4,2) },
{ LedId.Keyboard_X, (4,3) },
{ LedId.Keyboard_C, (4,4) },
{ LedId.Keyboard_V, (4,5) },
{ LedId.Keyboard_B, (4,6) },
{ LedId.Keyboard_N, (4,7) },
{ LedId.Keyboard_M, (4,8) },
{ LedId.Keyboard_CommaAndLessThan, (4,9) },
{ LedId.Keyboard_PeriodAndBiggerThan, (4,10) },
{ LedId.Keyboard_SlashAndQuestionMark, (4,11) },
{ LedId.Keyboard_International2, (4,12) },
{ LedId.Keyboard_RightShift, (4,14) },
{ LedId.Keyboard_ArrowUp, (4,16) },
{ LedId.Keyboard_Num1, (4,18) },
{ LedId.Keyboard_Num2, (4,19) },
{ LedId.Keyboard_Num3, (4,20) },
{ LedId.Keyboard_NumEnter, (4,21) },
{ LedId.Keyboard_LeftCtrl, (5,0) },
{ LedId.Keyboard_LeftGui, (5,1) },
{ LedId.Keyboard_LeftAlt, (5,2) },
{ LedId.Keyboard_International3, (5,4) },
{ LedId.Keyboard_Space, (5,6) },
{ LedId.Keyboard_International4, (5,8) },
{ LedId.Keyboard_International5, (5,9) },
{ LedId.Keyboard_RightAlt, (5,10) },
{ LedId.Keyboard_RightGui, (5,11) },
{ LedId.Keyboard_Application, (5,12) },
{ LedId.Keyboard_RightCtrl, (5,14) },
{ LedId.Keyboard_ArrowLeft, (5,15) },
{ LedId.Keyboard_ArrowDown, (5,16) },
{ LedId.Keyboard_ArrowRight, (5,17) },
{ LedId.Keyboard_Num0, (5,18) },
{ LedId.Keyboard_NumPeriodAndDelete, (5,20) },
{ LedId.Keyboard_Custom5, (6,0) },
{ LedId.Keyboard_Custom6, (6,1) },
{ LedId.Keyboard_Custom7, (6,2) },
{ LedId.Keyboard_Custom8, (6,3) },
{ LedId.Keyboard_Custom9, (6,4) },
{ LedId.Keyboard_Custom10, (6,5) },
{ LedId.Keyboard_Custom11, (6,6) },
{ LedId.Keyboard_Custom12, (6,7) },
{ LedId.Keyboard_Custom13, (6,8) },
{ LedId.Keyboard_Custom14, (6,9) },
{ LedId.Keyboard_Custom15, (6,10) },
{ LedId.Keyboard_Custom16, (6,11) },
{ LedId.Keyboard_Custom17, (6,12) },
{ LedId.Keyboard_Custom18, (6,13) },
{ LedId.Keyboard_Custom19, (6,14) },
{ LedId.Keyboard_Custom20, (6,15) },
{ LedId.Keyboard_Custom21, (6,16) },
{ LedId.Keyboard_Custom22, (6,17) },
};
#endregion
#region CKxxx
private static readonly Dictionary<LedId, (int row, int column)> CKxxx_US = new Dictionary<LedId, (int row, int column)>
{
{ LedId.Keyboard_Escape, (0,0) },
{ LedId.Keyboard_F1, (0,1) },
{ LedId.Keyboard_F2, (0,2) },
{ LedId.Keyboard_F3, (0,3) },
{ LedId.Keyboard_F4, (0,4) },
{ LedId.Keyboard_F5, (0,6) },
{ LedId.Keyboard_F6, (0,7) },
{ LedId.Keyboard_F7, (0,8) },
{ LedId.Keyboard_F8, (0,9) },
{ LedId.Keyboard_F9, (0,11) },
{ LedId.Keyboard_F10, (0,12) },
{ LedId.Keyboard_F11, (0,13) },
{ LedId.Keyboard_F12, (0,14) },
{ LedId.Keyboard_PrintScreen, (0,15) },
{ LedId.Keyboard_ScrollLock, (0,16) },
{ LedId.Keyboard_PauseBreak, (0,17) },
{ LedId.Keyboard_GraveAccentAndTilde, (1,0) },
{ LedId.Keyboard_1, (1,1) },
{ LedId.Keyboard_2, (1,2) },
{ LedId.Keyboard_3, (1,3) },
{ LedId.Keyboard_4, (1,4) },
{ LedId.Keyboard_5, (1,5) },
{ LedId.Keyboard_6, (1,6) },
{ LedId.Keyboard_7, (1,7) },
{ LedId.Keyboard_8, (1,8) },
{ LedId.Keyboard_9, (1,9) },
{ LedId.Keyboard_0, (1,10) },
{ LedId.Keyboard_MinusAndUnderscore, (1,11) },
{ LedId.Keyboard_EqualsAndPlus, (1,12) },
{ LedId.Keyboard_Backspace, (1,14) },
{ LedId.Keyboard_Insert, (1,15) },
{ LedId.Keyboard_Home, (1,16) },
{ LedId.Keyboard_PageUp, (1,17) },
{ LedId.Keyboard_NumLock, (1,18) },
{ LedId.Keyboard_NumSlash, (1,19) },
{ LedId.Keyboard_NumAsterisk, (1,20) },
{ LedId.Keyboard_NumMinus, (1,21) },
{ LedId.Keyboard_Tab, (2,0) },
{ LedId.Keyboard_Q, (2,1) },
{ LedId.Keyboard_W, (2,2) },
{ LedId.Keyboard_E, (2,3) },
{ LedId.Keyboard_R, (2,4) },
{ LedId.Keyboard_T, (2,5) },
{ LedId.Keyboard_Y, (2,6) },
{ LedId.Keyboard_U, (2,7) },
{ LedId.Keyboard_I, (2,8) },
{ LedId.Keyboard_O, (2,9) },
{ LedId.Keyboard_P, (2,10) },
{ LedId.Keyboard_BracketLeft, (2,11) },
{ LedId.Keyboard_BracketRight, (2,12) },
{ LedId.Keyboard_Backslash, (2,14) },
{ LedId.Keyboard_Delete, (2,15) },
{ LedId.Keyboard_End, (2,16) },
{ LedId.Keyboard_PageDown, (2,17) },
{ LedId.Keyboard_Num7, (2,18) },
{ LedId.Keyboard_Num8, (2,19) },
{ LedId.Keyboard_Num9, (2,20) },
{ LedId.Keyboard_NumPlus, (2,21) },
{ LedId.Keyboard_CapsLock, (3,0) },
{ LedId.Keyboard_A, (3,1) },
{ LedId.Keyboard_S, (3,2) },
{ LedId.Keyboard_D, (3,3) },
{ LedId.Keyboard_F, (3,4) },
{ LedId.Keyboard_G, (3,5) },
{ LedId.Keyboard_H, (3,6) },
{ LedId.Keyboard_J, (3,7) },
{ LedId.Keyboard_K, (3,8) },
{ LedId.Keyboard_L, (3,9) },
{ LedId.Keyboard_SemicolonAndColon, (3,10) },
{ LedId.Keyboard_ApostropheAndDoubleQuote, (3,11) },
{ LedId.Keyboard_Enter, (3,14) },
{ LedId.Keyboard_Num4, (3,18) },
{ LedId.Keyboard_Num5, (3,19) },
{ LedId.Keyboard_Num6, (3,20) },
{ LedId.Keyboard_LeftShift, (4,0) },
{ LedId.Keyboard_Z, (4,2) },
{ LedId.Keyboard_X, (4,3) },
{ LedId.Keyboard_C, (4,4) },
{ LedId.Keyboard_V, (4,5) },
{ LedId.Keyboard_B, (4,6) },
{ LedId.Keyboard_N, (4,7) },
{ LedId.Keyboard_M, (4,8) },
{ LedId.Keyboard_CommaAndLessThan, (4,9) },
{ LedId.Keyboard_PeriodAndBiggerThan, (4,10) },
{ LedId.Keyboard_SlashAndQuestionMark, (4,11) },
{ LedId.Keyboard_RightShift, (4,14) },
{ LedId.Keyboard_ArrowUp, (4,16) },
{ LedId.Keyboard_Num1, (4,18) },
{ LedId.Keyboard_Num2, (4,19) },
{ LedId.Keyboard_Num3, (4,20) },
{ LedId.Keyboard_NumEnter, (4,21) },
{ LedId.Keyboard_LeftCtrl, (5,0) },
{ LedId.Keyboard_LeftGui, (5,1) },
{ LedId.Keyboard_LeftAlt, (5,2) },
{ LedId.Keyboard_Space, (5,6) },
{ LedId.Keyboard_RightAlt, (5,10) },
{ LedId.Keyboard_RightGui, (5,11) },
{ LedId.Keyboard_Application, (5,12) },
{ LedId.Keyboard_RightCtrl, (5,14) },
{ LedId.Keyboard_ArrowLeft, (5,15) },
{ LedId.Keyboard_ArrowDown, (5,16) },
{ LedId.Keyboard_ArrowRight, (5,17) },
{ LedId.Keyboard_Num0, (5,18) },
{ LedId.Keyboard_NumPeriodAndDelete, (5,20) }
};
private static readonly Dictionary<LedId, (int row, int column)> CKxxx_EU = new Dictionary<LedId, (int row, int column)>
{
{ LedId.Keyboard_Escape, (0,0) },
{ LedId.Keyboard_F1, (0,1) },
{ LedId.Keyboard_F2, (0,2) },
{ LedId.Keyboard_F3, (0,3) },
{ LedId.Keyboard_F4, (0,4) },
{ LedId.Keyboard_F5, (0,6) },
{ LedId.Keyboard_F6, (0,7) },
{ LedId.Keyboard_F7, (0,8) },
{ LedId.Keyboard_F8, (0,9) },
{ LedId.Keyboard_F9, (0,11) },
{ LedId.Keyboard_F10, (0,12) },
{ LedId.Keyboard_F11, (0,13) },
{ LedId.Keyboard_F12, (0,14) },
{ LedId.Keyboard_PrintScreen, (0,15) },
{ LedId.Keyboard_ScrollLock, (0,16) },
{ LedId.Keyboard_PauseBreak, (0,17) },
{ LedId.Keyboard_GraveAccentAndTilde, (1,0) },
{ LedId.Keyboard_1, (1,1) },
{ LedId.Keyboard_2, (1,2) },
{ LedId.Keyboard_3, (1,3) },
{ LedId.Keyboard_4, (1,4) },
{ LedId.Keyboard_5, (1,5) },
{ LedId.Keyboard_6, (1,6) },
{ LedId.Keyboard_7, (1,7) },
{ LedId.Keyboard_8, (1,8) },
{ LedId.Keyboard_9, (1,9) },
{ LedId.Keyboard_0, (1,10) },
{ LedId.Keyboard_MinusAndUnderscore, (1,11) },
{ LedId.Keyboard_EqualsAndPlus, (1,12) },
{ LedId.Keyboard_Backspace, (1,14) },
{ LedId.Keyboard_Insert, (1,15) },
{ LedId.Keyboard_Home, (1,16) },
{ LedId.Keyboard_PageUp, (1,17) },
{ LedId.Keyboard_NumLock, (1,18) },
{ LedId.Keyboard_NumSlash, (1,19) },
{ LedId.Keyboard_NumAsterisk, (1,20) },
{ LedId.Keyboard_NumMinus, (1,21) },
{ LedId.Keyboard_Tab, (2,0) },
{ LedId.Keyboard_Q, (2,1) },
{ LedId.Keyboard_W, (2,2) },
{ LedId.Keyboard_E, (2,3) },
{ LedId.Keyboard_R, (2,4) },
{ LedId.Keyboard_T, (2,5) },
{ LedId.Keyboard_Y, (2,6) },
{ LedId.Keyboard_U, (2,7) },
{ LedId.Keyboard_I, (2,8) },
{ LedId.Keyboard_O, (2,9) },
{ LedId.Keyboard_P, (2,10) },
{ LedId.Keyboard_BracketLeft, (2,11) },
{ LedId.Keyboard_BracketRight, (2,12) },
{ LedId.Keyboard_Enter, (2,14) },
{ LedId.Keyboard_Delete, (2,15) },
{ LedId.Keyboard_End, (2,16) },
{ LedId.Keyboard_PageDown, (2,17) },
{ LedId.Keyboard_Num7, (2,18) },
{ LedId.Keyboard_Num8, (2,19) },
{ LedId.Keyboard_Num9, (2,20) },
{ LedId.Keyboard_NumPlus, (2,21) },
{ LedId.Keyboard_CapsLock, (3,0) },
{ LedId.Keyboard_A, (3,1) },
{ LedId.Keyboard_S, (3,2) },
{ LedId.Keyboard_D, (3,3) },
{ LedId.Keyboard_F, (3,4) },
{ LedId.Keyboard_G, (3,5) },
{ LedId.Keyboard_H, (3,6) },
{ LedId.Keyboard_J, (3,7) },
{ LedId.Keyboard_K, (3,8) },
{ LedId.Keyboard_L, (3,9) },
{ LedId.Keyboard_SemicolonAndColon, (3,10) },
{ LedId.Keyboard_ApostropheAndDoubleQuote, (3,11) },
{ LedId.Keyboard_NonUsTilde, (3,12) },
{ LedId.Keyboard_Num4, (3,18) },
{ LedId.Keyboard_Num5, (3,19) },
{ LedId.Keyboard_Num6, (3,20) },
{ LedId.Keyboard_LeftShift, (4,0) },
{ LedId.Keyboard_NonUsBackslash, (4,1) },
{ LedId.Keyboard_Z, (4,2) },
{ LedId.Keyboard_X, (4,3) },
{ LedId.Keyboard_C, (4,4) },
{ LedId.Keyboard_V, (4,5) },
{ LedId.Keyboard_B, (4,6) },
{ LedId.Keyboard_N, (4,7) },
{ LedId.Keyboard_M, (4,8) },
{ LedId.Keyboard_CommaAndLessThan, (4,9) },
{ LedId.Keyboard_PeriodAndBiggerThan, (4,10) },
{ LedId.Keyboard_SlashAndQuestionMark, (4,11) },
{ LedId.Keyboard_RightShift, (4,14) },
{ LedId.Keyboard_ArrowUp, (4,16) },
{ LedId.Keyboard_Num1, (4,18) },
{ LedId.Keyboard_Num2, (4,19) },
{ LedId.Keyboard_Num3, (4,20) },
{ LedId.Keyboard_NumEnter, (4,21) },
{ LedId.Keyboard_LeftCtrl, (5,0) },
{ LedId.Keyboard_LeftGui, (5,1) },
{ LedId.Keyboard_LeftAlt, (5,2) },
{ LedId.Keyboard_Space, (5,6) },
{ LedId.Keyboard_RightAlt, (5,10) },
{ LedId.Keyboard_RightGui, (5,11) },
{ LedId.Keyboard_Application, (5,12) },
{ LedId.Keyboard_RightCtrl, (5,14) },
{ LedId.Keyboard_ArrowLeft, (5,15) },
{ LedId.Keyboard_ArrowDown, (5,16) },
{ LedId.Keyboard_ArrowRight, (5,17) },
{ LedId.Keyboard_Num0, (5,18) },
{ LedId.Keyboard_NumPeriodAndDelete, (5,20) }
};
private static readonly Dictionary<LedId, (int row, int column)> CKxxx_JP = new Dictionary<LedId, (int row, int column)>
{
{ LedId.Keyboard_Escape, (0,0) },
{ LedId.Keyboard_F1, (0,1) },
{ LedId.Keyboard_F2, (0,2) },
{ LedId.Keyboard_F3, (0,3) },
{ LedId.Keyboard_F4, (0,4) },
{ LedId.Keyboard_F5, (0,6) },
{ LedId.Keyboard_F6, (0,7) },
{ LedId.Keyboard_F7, (0,8) },
{ LedId.Keyboard_F8, (0,9) },
{ LedId.Keyboard_F9, (0,11) },
{ LedId.Keyboard_F10, (0,12) },
{ LedId.Keyboard_F11, (0,13) },
{ LedId.Keyboard_F12, (0,14) },
{ LedId.Keyboard_PrintScreen, (0,15) },
{ LedId.Keyboard_ScrollLock, (0,16) },
{ LedId.Keyboard_PauseBreak, (0,17) },
{ LedId.Keyboard_GraveAccentAndTilde, (1,0) },
{ LedId.Keyboard_1, (1,1) },
{ LedId.Keyboard_2, (1,2) },
{ LedId.Keyboard_3, (1,3) },
{ LedId.Keyboard_4, (1,4) },
{ LedId.Keyboard_5, (1,5) },
{ LedId.Keyboard_6, (1,6) },
{ LedId.Keyboard_7, (1,7) },
{ LedId.Keyboard_8, (1,8) },
{ LedId.Keyboard_9, (1,9) },
{ LedId.Keyboard_0, (1,10) },
{ LedId.Keyboard_MinusAndUnderscore, (1,11) },
{ LedId.Keyboard_EqualsAndPlus, (1,12) },
{ LedId.Keyboard_International1, (1,13) },
{ LedId.Keyboard_Backspace, (1,14) },
{ LedId.Keyboard_Insert, (1,15) },
{ LedId.Keyboard_Home, (1,16) },
{ LedId.Keyboard_PageUp, (1,17) },
{ LedId.Keyboard_NumLock, (1,18) },
{ LedId.Keyboard_NumSlash, (1,19) },
{ LedId.Keyboard_NumAsterisk, (1,20) },
{ LedId.Keyboard_NumMinus, (1,21) },
{ LedId.Keyboard_Tab, (2,0) },
{ LedId.Keyboard_Q, (2,1) },
{ LedId.Keyboard_W, (2,2) },
{ LedId.Keyboard_E, (2,3) },
{ LedId.Keyboard_R, (2,4) },
{ LedId.Keyboard_T, (2,5) },
{ LedId.Keyboard_Y, (2,6) },
{ LedId.Keyboard_U, (2,7) },
{ LedId.Keyboard_I, (2,8) },
{ LedId.Keyboard_O, (2,9) },
{ LedId.Keyboard_P, (2,10) },
{ LedId.Keyboard_BracketLeft, (2,11) },
{ LedId.Keyboard_BracketRight, (2,12) },
{ LedId.Keyboard_Enter, (2,14) },
{ LedId.Keyboard_Delete, (2,15) },
{ LedId.Keyboard_End, (2,16) },
{ LedId.Keyboard_PageDown, (2,17) },
{ LedId.Keyboard_Num7, (2,18) },
{ LedId.Keyboard_Num8, (2,19) },
{ LedId.Keyboard_Num9, (2,20) },
{ LedId.Keyboard_NumPlus, (2,21) },
{ LedId.Keyboard_CapsLock, (3,0) },
{ LedId.Keyboard_A, (3,1) },
{ LedId.Keyboard_S, (3,2) },
{ LedId.Keyboard_D, (3,3) },
{ LedId.Keyboard_F, (3,4) },
{ LedId.Keyboard_G, (3,5) },
{ LedId.Keyboard_H, (3,6) },
{ LedId.Keyboard_J, (3,7) },
{ LedId.Keyboard_K, (3,8) },
{ LedId.Keyboard_L, (3,9) },
{ LedId.Keyboard_SemicolonAndColon, (3,10) },
{ LedId.Keyboard_ApostropheAndDoubleQuote, (3,11) },
{ LedId.Keyboard_Backslash, (3,14) },
{ LedId.Keyboard_Num4, (3,18) },
{ LedId.Keyboard_Num5, (3,19) },
{ LedId.Keyboard_Num6, (3,20) },
{ LedId.Keyboard_LeftShift, (4,0) },
{ LedId.Keyboard_Z, (4,2) },
{ LedId.Keyboard_X, (4,3) },
{ LedId.Keyboard_C, (4,4) },
{ LedId.Keyboard_V, (4,5) },
{ LedId.Keyboard_B, (4,6) },
{ LedId.Keyboard_N, (4,7) },
{ LedId.Keyboard_M, (4,8) },
{ LedId.Keyboard_CommaAndLessThan, (4,9) },
{ LedId.Keyboard_PeriodAndBiggerThan, (4,10) },
{ LedId.Keyboard_SlashAndQuestionMark, (4,11) },
{ LedId.Keyboard_International2, (4,12) },
{ LedId.Keyboard_RightShift, (4,14) },
{ LedId.Keyboard_ArrowUp, (4,16) },
{ LedId.Keyboard_Num1, (4,18) },
{ LedId.Keyboard_Num2, (4,19) },
{ LedId.Keyboard_Num3, (4,20) },
{ LedId.Keyboard_NumEnter, (4,21) },
{ LedId.Keyboard_LeftCtrl, (5,0) },
{ LedId.Keyboard_LeftGui, (5,1) },
{ LedId.Keyboard_LeftAlt, (5,2) },
{ LedId.Keyboard_International3, (5,4) },
{ LedId.Keyboard_Space, (5,6) },
{ LedId.Keyboard_International4, (5,8) },
{ LedId.Keyboard_International5, (5,9) },
{ LedId.Keyboard_RightAlt, (5,10) },
{ LedId.Keyboard_RightGui, (5,11) },
{ LedId.Keyboard_Application, (5,12) },
{ LedId.Keyboard_RightCtrl, (5,14) },
{ LedId.Keyboard_ArrowLeft, (5,15) },
{ LedId.Keyboard_ArrowDown, (5,16) },
{ LedId.Keyboard_ArrowRight, (5,17) },
{ LedId.Keyboard_Num0, (5,18) },
{ LedId.Keyboard_NumPeriodAndDelete, (5,20) }
};
#endregion
/// <summary> /// <summary>
/// Contains all the hardware-id mappings for CoolerMaster devices. /// Contains all the hardware-id mappings for CoolerMaster devices.
/// </summary> /// </summary>
@ -702,6 +1493,38 @@ namespace RGB.NET.Devices.CoolerMaster
{ CoolerMasterPhysicalKeyboardLayout.EU, MasterKeysS_EU } { CoolerMasterPhysicalKeyboardLayout.EU, MasterKeysS_EU }
} }
}, },
{ CoolerMasterDevicesIndexes.MasterKeys_MK750, new Dictionary<CoolerMasterPhysicalKeyboardLayout, Dictionary<LedId, (int row, int column)>>
{
{ CoolerMasterPhysicalKeyboardLayout.US, MasterKeysMK750_US},
{ CoolerMasterPhysicalKeyboardLayout.EU, MasterKeysMK750_EU },
{ CoolerMasterPhysicalKeyboardLayout.JP, MasterKeysMK750_JP }
}
},
{ CoolerMasterDevicesIndexes.CK372, new Dictionary<CoolerMasterPhysicalKeyboardLayout, Dictionary<LedId, (int row, int column)>>
{
{ CoolerMasterPhysicalKeyboardLayout.US, CKxxx_US},
{ CoolerMasterPhysicalKeyboardLayout.EU, CKxxx_EU },
{ CoolerMasterPhysicalKeyboardLayout.JP, CKxxx_JP }
}
},
{ CoolerMasterDevicesIndexes.CK550, new Dictionary<CoolerMasterPhysicalKeyboardLayout, Dictionary<LedId, (int row, int column)>>
{
{ CoolerMasterPhysicalKeyboardLayout.US, CKxxx_US},
{ CoolerMasterPhysicalKeyboardLayout.EU, CKxxx_EU },
{ CoolerMasterPhysicalKeyboardLayout.JP, CKxxx_JP }
}
},
{ CoolerMasterDevicesIndexes.CK551, new Dictionary<CoolerMasterPhysicalKeyboardLayout, Dictionary<LedId, (int row, int column)>>
{
{ CoolerMasterPhysicalKeyboardLayout.US, CKxxx_US},
{ CoolerMasterPhysicalKeyboardLayout.EU, CKxxx_EU },
{ CoolerMasterPhysicalKeyboardLayout.JP, CKxxx_JP }
}
},
}; };
#endregion #endregion

View File

@ -32,6 +32,22 @@ namespace RGB.NET.Devices.CoolerMaster
{ LedId.Mouse2, (0,1) } { LedId.Mouse2, (0,1) }
} }
}, },
{ CoolerMasterDevicesIndexes.MM530, new Dictionary<LedId, (int row, int column)>
{
{ LedId.Mouse1, (0,0) },
{ LedId.Mouse2, (0,1) },
{ LedId.Mouse3, (0,2) }
}
},
{ CoolerMasterDevicesIndexes.MM520, new Dictionary<LedId, (int row, int column)>
{
{ LedId.Mouse1, (0,0) },
{ LedId.Mouse2, (0,1) },
{ LedId.Mouse3, (0,2) }
}
},
}; };
#endregion #endregion

View File

@ -9,8 +9,8 @@ namespace RGB.NET.Devices.CoolerMaster.Native
// ReSharper disable MemberCanBePrivate.Global // ReSharper disable MemberCanBePrivate.Global
internal const int ROWS = 6; internal const int ROWS = 7;
internal const int COLUMNS = 22; internal const int COLUMNS = 24;
// ReSharper restore MemberCanBePrivate.Global // ReSharper restore MemberCanBePrivate.Global

View File

@ -97,26 +97,26 @@ namespace RGB.NET.Devices.CoolerMaster.Native
[UnmanagedFunctionPointer(CallingConvention.Cdecl)] [UnmanagedFunctionPointer(CallingConvention.Cdecl)]
[return: MarshalAs(UnmanagedType.I1)] [return: MarshalAs(UnmanagedType.I1)]
private delegate bool IsDevicePlugPointer(); private delegate bool IsDevicePlugPointer(CoolerMasterDevicesIndexes devIndex);
[UnmanagedFunctionPointer(CallingConvention.Cdecl)] [UnmanagedFunctionPointer(CallingConvention.Cdecl)]
private delegate CoolerMasterPhysicalKeyboardLayout GetDeviceLayoutPointer(); private delegate CoolerMasterPhysicalKeyboardLayout GetDeviceLayoutPointer(CoolerMasterDevicesIndexes devIndex);
[UnmanagedFunctionPointer(CallingConvention.Cdecl)] [UnmanagedFunctionPointer(CallingConvention.Cdecl)]
[return: MarshalAs(UnmanagedType.I1)] [return: MarshalAs(UnmanagedType.I1)]
private delegate bool EnableLedControlPointer(bool value); private delegate bool EnableLedControlPointer(bool value, CoolerMasterDevicesIndexes devIndex);
[UnmanagedFunctionPointer(CallingConvention.Cdecl)] [UnmanagedFunctionPointer(CallingConvention.Cdecl)]
[return: MarshalAs(UnmanagedType.I1)] [return: MarshalAs(UnmanagedType.I1)]
private delegate bool RefreshLedPointer(bool autoRefresh); private delegate bool RefreshLedPointer(bool autoRefresh, CoolerMasterDevicesIndexes devIndex);
[UnmanagedFunctionPointer(CallingConvention.Cdecl)] [UnmanagedFunctionPointer(CallingConvention.Cdecl)]
[return: MarshalAs(UnmanagedType.I1)] [return: MarshalAs(UnmanagedType.I1)]
private delegate bool SetLedColorPointer(int row, int column, byte r, byte g, byte b); private delegate bool SetLedColorPointer(int row, int column, byte r, byte g, byte b, CoolerMasterDevicesIndexes devIndex);
[UnmanagedFunctionPointer(CallingConvention.Cdecl)] [UnmanagedFunctionPointer(CallingConvention.Cdecl)]
[return: MarshalAs(UnmanagedType.I1)] [return: MarshalAs(UnmanagedType.I1)]
private delegate bool SetAllLedColorPointer(_CoolerMasterColorMatrix colorMatrix); private delegate bool SetAllLedColorPointer(_CoolerMasterColorMatrix colorMatrix, CoolerMasterDevicesIndexes devIndex);
#endregion #endregion
@ -130,37 +130,44 @@ namespace RGB.NET.Devices.CoolerMaster.Native
/// <summary> /// <summary>
/// CM-SDK: set operating device /// CM-SDK: set operating device
/// </summary> /// </summary>
internal static void SetControlDevice(CoolerMasterDevicesIndexes devicesIndexes) => _setControlDevicenPointer(devicesIndexes); internal static void SetControlDevice(CoolerMasterDevicesIndexes devicesIndexes)
=> _setControlDevicenPointer(devicesIndexes);
/// <summary> /// <summary>
/// CM-SDK: verify if the deviced is plugged in /// CM-SDK: verify if the deviced is plugged in
/// </summary> /// </summary>
internal static bool IsDevicePlugged() => _isDevicePlugPointer(); internal static bool IsDevicePlugged(CoolerMasterDevicesIndexes devIndex = CoolerMasterDevicesIndexes.Default)
=> _isDevicePlugPointer(devIndex);
/// <summary> /// <summary>
/// CM-SDK: Obtain current device layout /// CM-SDK: Obtain current device layout
/// </summary> /// </summary>
internal static CoolerMasterPhysicalKeyboardLayout GetDeviceLayout() => _getDeviceLayoutPointer(); internal static CoolerMasterPhysicalKeyboardLayout GetDeviceLayout(CoolerMasterDevicesIndexes devIndex = CoolerMasterDevicesIndexes.Default)
=> _getDeviceLayoutPointer(devIndex);
/// <summary> /// <summary>
/// CM-SDK: set control over devices LED /// CM-SDK: set control over devices LED
/// </summary> /// </summary>
internal static bool EnableLedControl(bool value) => _enableLedControlPointer(value); internal static bool EnableLedControl(bool value, CoolerMasterDevicesIndexes devIndex = CoolerMasterDevicesIndexes.Default)
=> _enableLedControlPointer(value, devIndex);
/// <summary> /// <summary>
/// CM-SDK: Print out the lights setting from Buffer to LED /// CM-SDK: Print out the lights setting from Buffer to LED
/// </summary> /// </summary>
internal static bool RefreshLed(bool autoRefresh) => _refreshLedPointer(autoRefresh); internal static bool RefreshLed(bool autoRefresh, CoolerMasterDevicesIndexes devIndex = CoolerMasterDevicesIndexes.Default)
=> _refreshLedPointer(autoRefresh, devIndex);
/// <summary> /// <summary>
/// CM-SDK: Set single Key LED color /// CM-SDK: Set single Key LED color
/// </summary> /// </summary>
internal static bool SetLedColor(int row, int column, byte r, byte g, byte b) => _setLedColorPointer(row, column, r, g, b); internal static bool SetLedColor(int row, int column, byte r, byte g, byte b, CoolerMasterDevicesIndexes devIndex = CoolerMasterDevicesIndexes.Default)
=> _setLedColorPointer(row, column, r, g, b, devIndex);
/// <summary> /// <summary>
/// CM-SDK: Set Keyboard "every LED" color /// CM-SDK: Set Keyboard "every LED" color
/// </summary> /// </summary>
internal static bool SetAllLedColor(_CoolerMasterColorMatrix colorMatrix) => _setAllLedColorPointer(colorMatrix); internal static bool SetAllLedColor(_CoolerMasterColorMatrix colorMatrix, CoolerMasterDevicesIndexes devIndex = CoolerMasterDevicesIndexes.Default)
=> _setAllLedColorPointer(colorMatrix, devIndex);
// ReSharper restore EventExceptionNotDocumented // ReSharper restore EventExceptionNotDocumented