mirror of
https://github.com/DarthAffe/CUE.NET.git
synced 2025-12-13 09:08:34 +00:00
Improved LedId enums (now constants)
This commit is contained in:
parent
223c0e8886
commit
f8c537aaff
@ -81,14 +81,14 @@
|
|||||||
<Compile Include="Effects\EffectTimeContainer.cs" />
|
<Compile Include="Effects\EffectTimeContainer.cs" />
|
||||||
<Compile Include="Devices\Keyboard\Enums\CorsairLogicalKeyboardLayout.cs" />
|
<Compile Include="Devices\Keyboard\Enums\CorsairLogicalKeyboardLayout.cs" />
|
||||||
<Compile Include="Devices\Headset\Enums\CorsairHeadsetLedId.cs" />
|
<Compile Include="Devices\Headset\Enums\CorsairHeadsetLedId.cs" />
|
||||||
<Compile Include="Devices\Keyboard\Enums\CorsairKeyboardKeyId.cs" />
|
<Compile Include="Devices\Keyboard\Enums\CorsairKeyboardLedId.cs" />
|
||||||
<Compile Include="Devices\Keyboard\Enums\CorsairPhysicalKeyboardLayout.cs" />
|
<Compile Include="Devices\Keyboard\Enums\CorsairPhysicalKeyboardLayout.cs" />
|
||||||
<Compile Include="Devices\Generic\Enums\UpdateMode.cs" />
|
<Compile Include="Devices\Generic\Enums\UpdateMode.cs" />
|
||||||
<Compile Include="Groups\AbstractLedGroup.cs" />
|
<Compile Include="Groups\AbstractLedGroup.cs" />
|
||||||
<Compile Include="Groups\ILedGroup.cs" />
|
<Compile Include="Groups\ILedGroup.cs" />
|
||||||
<Compile Include="Groups\RectangleLedGroup.cs" />
|
<Compile Include="Groups\RectangleLedGroup.cs" />
|
||||||
<Compile Include="Groups\ListLedGroup.cs" />
|
<Compile Include="Groups\ListLedGroup.cs" />
|
||||||
<Compile Include="Devices\Mouse\Enums\CorsairMouseButtonId.cs" />
|
<Compile Include="Devices\Mouse\Enums\CorsairMouseLedId.cs" />
|
||||||
<Compile Include="Devices\Mouse\Enums\CorsairPhysicalMouseLayout.cs" />
|
<Compile Include="Devices\Mouse\Enums\CorsairPhysicalMouseLayout.cs" />
|
||||||
<Compile Include="Exceptions\CUEException.cs" />
|
<Compile Include="Exceptions\CUEException.cs" />
|
||||||
<Compile Include="Exceptions\WrapperException.cs" />
|
<Compile Include="Exceptions\WrapperException.cs" />
|
||||||
|
|||||||
@ -41,8 +41,8 @@ namespace CUE.NET.Devices.Headset
|
|||||||
|
|
||||||
protected override void InitializeLeds()
|
protected override void InitializeLeds()
|
||||||
{
|
{
|
||||||
InitializeLed((CorsairLedId)CorsairHeadsetLedId.LeftLogo, new RectangleF(0, 0, 1, 1));
|
InitializeLed(CorsairHeadsetLedId.LeftLogo, new RectangleF(0, 0, 1, 1));
|
||||||
InitializeLed((CorsairLedId)CorsairHeadsetLedId.RightLogo, new RectangleF(1, 0, 1, 1));
|
InitializeLed(CorsairHeadsetLedId.RightLogo, new RectangleF(1, 0, 1, 1));
|
||||||
}
|
}
|
||||||
|
|
||||||
#endregion
|
#endregion
|
||||||
|
|||||||
@ -1,15 +1,17 @@
|
|||||||
// ReSharper disable UnusedMember.Global
|
// ReSharper disable UnusedMember.Global
|
||||||
// ReSharper disable InconsistentNaming
|
// ReSharper disable InconsistentNaming
|
||||||
|
|
||||||
|
using CUE.NET.Devices.Generic.Enums;
|
||||||
|
|
||||||
namespace CUE.NET.Devices.Headset.Enums
|
namespace CUE.NET.Devices.Headset.Enums
|
||||||
{
|
{
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Contains list of all LEDs available for corsair headsets.
|
/// Contains list of all LEDs available for corsair headsets.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public enum CorsairHeadsetLedId
|
public static class CorsairHeadsetLedId
|
||||||
{
|
{
|
||||||
Invalid = 0,
|
public const CorsairLedId Invalid = CorsairLedId.Invalid;
|
||||||
LeftLogo = 152,
|
public const CorsairLedId LeftLogo = CorsairLedId.LeftLogo;
|
||||||
RightLogo = 153
|
public const CorsairLedId RightLogo = CorsairLedId.RightLogo;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@ -1,161 +0,0 @@
|
|||||||
// ReSharper disable UnusedMember.Global
|
|
||||||
// ReSharper disable InconsistentNaming
|
|
||||||
|
|
||||||
namespace CUE.NET.Devices.Keyboard.Enums
|
|
||||||
{
|
|
||||||
/// <summary>
|
|
||||||
/// Contains list of all LEDs available for corsair keyboards.
|
|
||||||
/// </summary>
|
|
||||||
public enum CorsairKeyboardKeyId
|
|
||||||
{
|
|
||||||
Invalid = 0,
|
|
||||||
Escape = 1,
|
|
||||||
F1 = 2,
|
|
||||||
F2 = 3,
|
|
||||||
F3 = 4,
|
|
||||||
F4 = 5,
|
|
||||||
F5 = 6,
|
|
||||||
F6 = 7,
|
|
||||||
F7 = 8,
|
|
||||||
F8 = 9,
|
|
||||||
F9 = 10,
|
|
||||||
F10 = 11,
|
|
||||||
F11 = 12,
|
|
||||||
GraveAccentAndTilde = 13,
|
|
||||||
D1 = 14,
|
|
||||||
D2 = 15,
|
|
||||||
D3 = 16,
|
|
||||||
D4 = 17,
|
|
||||||
D5 = 18,
|
|
||||||
D6 = 19,
|
|
||||||
D7 = 20,
|
|
||||||
D8 = 21,
|
|
||||||
D9 = 22,
|
|
||||||
D0 = 23,
|
|
||||||
MinusAndUnderscore = 24,
|
|
||||||
Tab = 25,
|
|
||||||
Q = 26,
|
|
||||||
W = 27,
|
|
||||||
E = 28,
|
|
||||||
R = 29,
|
|
||||||
T = 30,
|
|
||||||
Y = 31,
|
|
||||||
U = 32,
|
|
||||||
I = 33,
|
|
||||||
O = 34,
|
|
||||||
P = 35,
|
|
||||||
BracketLeft = 36,
|
|
||||||
CapsLock = 37,
|
|
||||||
A = 38,
|
|
||||||
S = 39,
|
|
||||||
D = 40,
|
|
||||||
F = 41,
|
|
||||||
G = 42,
|
|
||||||
H = 43,
|
|
||||||
J = 44,
|
|
||||||
K = 45,
|
|
||||||
L = 46,
|
|
||||||
SemicolonAndColon = 47,
|
|
||||||
ApostropheAndDoubleQuote = 48,
|
|
||||||
LeftShift = 49,
|
|
||||||
NonUsBackslash = 50,
|
|
||||||
Z = 51,
|
|
||||||
X = 52,
|
|
||||||
C = 53,
|
|
||||||
V = 54,
|
|
||||||
B = 55,
|
|
||||||
N = 56,
|
|
||||||
M = 57,
|
|
||||||
CommaAndLessThan = 58,
|
|
||||||
PeriodAndBiggerThan = 59,
|
|
||||||
SlashAndQuestionMark = 60,
|
|
||||||
LeftCtrl = 61,
|
|
||||||
LeftGui = 62,
|
|
||||||
LeftAlt = 63,
|
|
||||||
Lang2 = 64,
|
|
||||||
Space = 65,
|
|
||||||
Lang1 = 66,
|
|
||||||
International2 = 67,
|
|
||||||
RightAlt = 68,
|
|
||||||
RightGui = 69,
|
|
||||||
Application = 70,
|
|
||||||
LedProgramming = 71,
|
|
||||||
Brightness = 72,
|
|
||||||
F12 = 73,
|
|
||||||
PrintScreen = 74,
|
|
||||||
ScrollLock = 75,
|
|
||||||
PauseBreak = 76,
|
|
||||||
Insert = 77,
|
|
||||||
Home = 78,
|
|
||||||
PageUp = 79,
|
|
||||||
BracketRight = 80,
|
|
||||||
Backslash = 81,
|
|
||||||
NonUsTilde = 82,
|
|
||||||
Enter = 83,
|
|
||||||
International1 = 84,
|
|
||||||
EqualsAndPlus = 85,
|
|
||||||
International3 = 86,
|
|
||||||
Backspace = 87,
|
|
||||||
Delete = 88,
|
|
||||||
End = 89,
|
|
||||||
PageDown = 90,
|
|
||||||
RightShift = 91,
|
|
||||||
RightCtrl = 92,
|
|
||||||
UpArrow = 93,
|
|
||||||
LeftArrow = 94,
|
|
||||||
DownArrow = 95,
|
|
||||||
RightArrow = 96,
|
|
||||||
WinLock = 97,
|
|
||||||
Mute = 98,
|
|
||||||
Stop = 99,
|
|
||||||
ScanPreviousTrack = 100,
|
|
||||||
PlayPause = 101,
|
|
||||||
ScanNextTrack = 102,
|
|
||||||
NumLock = 103,
|
|
||||||
KeypadSlash = 104,
|
|
||||||
KeypadAsterisk = 105,
|
|
||||||
KeypadMinus = 106,
|
|
||||||
KeypadPlus = 107,
|
|
||||||
KeypadEnter = 108,
|
|
||||||
Keypad7 = 109,
|
|
||||||
Keypad8 = 110,
|
|
||||||
Keypad9 = 111,
|
|
||||||
KeypadComma = 112,
|
|
||||||
Keypad4 = 113,
|
|
||||||
Keypad5 = 114,
|
|
||||||
Keypad6 = 115,
|
|
||||||
Keypad1 = 116,
|
|
||||||
Keypad2 = 117,
|
|
||||||
Keypad3 = 118,
|
|
||||||
Keypad0 = 119,
|
|
||||||
KeypadPeriodAndDelete = 120,
|
|
||||||
G1 = 121,
|
|
||||||
G2 = 122,
|
|
||||||
G3 = 123,
|
|
||||||
G4 = 124,
|
|
||||||
G5 = 125,
|
|
||||||
G6 = 126,
|
|
||||||
G7 = 127,
|
|
||||||
G8 = 128,
|
|
||||||
G9 = 129,
|
|
||||||
G10 = 130,
|
|
||||||
VolumeUp = 131,
|
|
||||||
VolumeDown = 132,
|
|
||||||
MR = 133,
|
|
||||||
M1 = 134,
|
|
||||||
M2 = 135,
|
|
||||||
M3 = 136,
|
|
||||||
G11 = 137,
|
|
||||||
G12 = 138,
|
|
||||||
G13 = 139,
|
|
||||||
G14 = 140,
|
|
||||||
G15 = 141,
|
|
||||||
G16 = 142,
|
|
||||||
G17 = 143,
|
|
||||||
G18 = 144,
|
|
||||||
International5 = 145,
|
|
||||||
International4 = 146,
|
|
||||||
Fn = 147,
|
|
||||||
CLK_Logo = 154
|
|
||||||
}
|
|
||||||
}
|
|
||||||
163
Devices/Keyboard/Enums/CorsairKeyboardLedId.cs
Normal file
163
Devices/Keyboard/Enums/CorsairKeyboardLedId.cs
Normal file
@ -0,0 +1,163 @@
|
|||||||
|
// ReSharper disable UnusedMember.Global
|
||||||
|
// ReSharper disable InconsistentNaming
|
||||||
|
|
||||||
|
using CUE.NET.Devices.Generic.Enums;
|
||||||
|
|
||||||
|
namespace CUE.NET.Devices.Keyboard.Enums
|
||||||
|
{
|
||||||
|
/// <summary>
|
||||||
|
/// Contains list of all LEDs available for corsair keyboards.
|
||||||
|
/// </summary>
|
||||||
|
public static class CorsairKeyboardLedId
|
||||||
|
{
|
||||||
|
public const CorsairLedId Invalid = CorsairLedId.Invalid;
|
||||||
|
public const CorsairLedId Escape = CorsairLedId.Escape;
|
||||||
|
public const CorsairLedId F1 = CorsairLedId.F1;
|
||||||
|
public const CorsairLedId F2 = CorsairLedId.F2;
|
||||||
|
public const CorsairLedId F3 = CorsairLedId.F3;
|
||||||
|
public const CorsairLedId F4 = CorsairLedId.F4;
|
||||||
|
public const CorsairLedId F5 = CorsairLedId.F5;
|
||||||
|
public const CorsairLedId F6 = CorsairLedId.F6;
|
||||||
|
public const CorsairLedId F7 = CorsairLedId.F7;
|
||||||
|
public const CorsairLedId F8 = CorsairLedId.F8;
|
||||||
|
public const CorsairLedId F9 = CorsairLedId.F9;
|
||||||
|
public const CorsairLedId F10 = CorsairLedId.F10;
|
||||||
|
public const CorsairLedId F11 = CorsairLedId.F11;
|
||||||
|
public const CorsairLedId GraveAccentAndTilde = CorsairLedId.GraveAccentAndTilde;
|
||||||
|
public const CorsairLedId D1 = CorsairLedId.D1;
|
||||||
|
public const CorsairLedId D2 = CorsairLedId.D2;
|
||||||
|
public const CorsairLedId D3 = CorsairLedId.D3;
|
||||||
|
public const CorsairLedId D4 = CorsairLedId.D4;
|
||||||
|
public const CorsairLedId D5 = CorsairLedId.D5;
|
||||||
|
public const CorsairLedId D6 = CorsairLedId.D6;
|
||||||
|
public const CorsairLedId D7 = CorsairLedId.D7;
|
||||||
|
public const CorsairLedId D8 = CorsairLedId.D8;
|
||||||
|
public const CorsairLedId D9 = CorsairLedId.D9;
|
||||||
|
public const CorsairLedId D0 = CorsairLedId.D0;
|
||||||
|
public const CorsairLedId MinusAndUnderscore = CorsairLedId.MinusAndUnderscore;
|
||||||
|
public const CorsairLedId Tab = CorsairLedId.Tab;
|
||||||
|
public const CorsairLedId Q = CorsairLedId.Q;
|
||||||
|
public const CorsairLedId W = CorsairLedId.W;
|
||||||
|
public const CorsairLedId E = CorsairLedId.E;
|
||||||
|
public const CorsairLedId R = CorsairLedId.R;
|
||||||
|
public const CorsairLedId T = CorsairLedId.T;
|
||||||
|
public const CorsairLedId Y = CorsairLedId.Y;
|
||||||
|
public const CorsairLedId U = CorsairLedId.U;
|
||||||
|
public const CorsairLedId I = CorsairLedId.I;
|
||||||
|
public const CorsairLedId O = CorsairLedId.O;
|
||||||
|
public const CorsairLedId P = CorsairLedId.P;
|
||||||
|
public const CorsairLedId BracketLeft = CorsairLedId.BracketLeft;
|
||||||
|
public const CorsairLedId CapsLock = CorsairLedId.CapsLock;
|
||||||
|
public const CorsairLedId A = CorsairLedId.A;
|
||||||
|
public const CorsairLedId S = CorsairLedId.S;
|
||||||
|
public const CorsairLedId D = CorsairLedId.D;
|
||||||
|
public const CorsairLedId F = CorsairLedId.F;
|
||||||
|
public const CorsairLedId G = CorsairLedId.G;
|
||||||
|
public const CorsairLedId H = CorsairLedId.H;
|
||||||
|
public const CorsairLedId J = CorsairLedId.J;
|
||||||
|
public const CorsairLedId K = CorsairLedId.K;
|
||||||
|
public const CorsairLedId L = CorsairLedId.L;
|
||||||
|
public const CorsairLedId SemicolonAndColon = CorsairLedId.SemicolonAndColon;
|
||||||
|
public const CorsairLedId ApostropheAndDoubleQuote = CorsairLedId.ApostropheAndDoubleQuote;
|
||||||
|
public const CorsairLedId LeftShift = CorsairLedId.LeftShift;
|
||||||
|
public const CorsairLedId NonUsBackslash = CorsairLedId.NonUsBackslash;
|
||||||
|
public const CorsairLedId Z = CorsairLedId.Z;
|
||||||
|
public const CorsairLedId X = CorsairLedId.X;
|
||||||
|
public const CorsairLedId C = CorsairLedId.C;
|
||||||
|
public const CorsairLedId V = CorsairLedId.V;
|
||||||
|
public const CorsairLedId B = CorsairLedId.B;
|
||||||
|
public const CorsairLedId N = CorsairLedId.N;
|
||||||
|
public const CorsairLedId M = CorsairLedId.M;
|
||||||
|
public const CorsairLedId CommaAndLessThan = CorsairLedId.CommaAndLessThan;
|
||||||
|
public const CorsairLedId PeriodAndBiggerThan = CorsairLedId.PeriodAndBiggerThan;
|
||||||
|
public const CorsairLedId SlashAndQuestionMark = CorsairLedId.SlashAndQuestionMark;
|
||||||
|
public const CorsairLedId LeftCtrl = CorsairLedId.LeftCtrl;
|
||||||
|
public const CorsairLedId LeftGui = CorsairLedId.LeftGui;
|
||||||
|
public const CorsairLedId LeftAlt = CorsairLedId.LeftAlt;
|
||||||
|
public const CorsairLedId Lang2 = CorsairLedId.Lang2;
|
||||||
|
public const CorsairLedId Space = CorsairLedId.Space;
|
||||||
|
public const CorsairLedId Lang1 = CorsairLedId.Lang1;
|
||||||
|
public const CorsairLedId International2 = CorsairLedId.International2;
|
||||||
|
public const CorsairLedId RightAlt = CorsairLedId.RightAlt;
|
||||||
|
public const CorsairLedId RightGui = CorsairLedId.RightGui;
|
||||||
|
public const CorsairLedId Application = CorsairLedId.Application;
|
||||||
|
public const CorsairLedId LedProgramming = CorsairLedId.LedProgramming;
|
||||||
|
public const CorsairLedId Brightness = CorsairLedId.Brightness;
|
||||||
|
public const CorsairLedId F12 = CorsairLedId.F12;
|
||||||
|
public const CorsairLedId PrintScreen = CorsairLedId.PrintScreen;
|
||||||
|
public const CorsairLedId ScrollLock = CorsairLedId.ScrollLock;
|
||||||
|
public const CorsairLedId PauseBreak = CorsairLedId.PauseBreak;
|
||||||
|
public const CorsairLedId Insert = CorsairLedId.Insert;
|
||||||
|
public const CorsairLedId Home = CorsairLedId.Home;
|
||||||
|
public const CorsairLedId PageUp = CorsairLedId.PageUp;
|
||||||
|
public const CorsairLedId BracketRight = CorsairLedId.BracketRight;
|
||||||
|
public const CorsairLedId Backslash = CorsairLedId.Backslash;
|
||||||
|
public const CorsairLedId NonUsTilde = CorsairLedId.NonUsTilde;
|
||||||
|
public const CorsairLedId Enter = CorsairLedId.Enter;
|
||||||
|
public const CorsairLedId International1 = CorsairLedId.International1;
|
||||||
|
public const CorsairLedId EqualsAndPlus = CorsairLedId.EqualsAndPlus;
|
||||||
|
public const CorsairLedId International3 = CorsairLedId.International3;
|
||||||
|
public const CorsairLedId Backspace = CorsairLedId.Backspace;
|
||||||
|
public const CorsairLedId Delete = CorsairLedId.Delete;
|
||||||
|
public const CorsairLedId End = CorsairLedId.End;
|
||||||
|
public const CorsairLedId PageDown = CorsairLedId.PageDown;
|
||||||
|
public const CorsairLedId RightShift = CorsairLedId.RightShift;
|
||||||
|
public const CorsairLedId RightCtrl = CorsairLedId.RightCtrl;
|
||||||
|
public const CorsairLedId UpArrow = CorsairLedId.UpArrow;
|
||||||
|
public const CorsairLedId LeftArrow = CorsairLedId.LeftArrow;
|
||||||
|
public const CorsairLedId DownArrow = CorsairLedId.DownArrow;
|
||||||
|
public const CorsairLedId RightArrow = CorsairLedId.RightArrow;
|
||||||
|
public const CorsairLedId WinLock = CorsairLedId.WinLock;
|
||||||
|
public const CorsairLedId Mute = CorsairLedId.Mute;
|
||||||
|
public const CorsairLedId Stop = CorsairLedId.Stop;
|
||||||
|
public const CorsairLedId ScanPreviousTrack = CorsairLedId.ScanPreviousTrack;
|
||||||
|
public const CorsairLedId PlayPause = CorsairLedId.PlayPause;
|
||||||
|
public const CorsairLedId ScanNextTrack = CorsairLedId.ScanNextTrack;
|
||||||
|
public const CorsairLedId NumLock = CorsairLedId.NumLock;
|
||||||
|
public const CorsairLedId KeypadSlash = CorsairLedId.KeypadSlash;
|
||||||
|
public const CorsairLedId KeypadAsterisk = CorsairLedId.KeypadAsterisk;
|
||||||
|
public const CorsairLedId KeypadMinus = CorsairLedId.KeypadMinus;
|
||||||
|
public const CorsairLedId KeypadPlus = CorsairLedId.KeypadPlus;
|
||||||
|
public const CorsairLedId KeypadEnter = CorsairLedId.KeypadEnter;
|
||||||
|
public const CorsairLedId Keypad7 = CorsairLedId.Keypad7;
|
||||||
|
public const CorsairLedId Keypad8 = CorsairLedId.Keypad8;
|
||||||
|
public const CorsairLedId Keypad9 = CorsairLedId.Keypad9;
|
||||||
|
public const CorsairLedId KeypadComma = CorsairLedId.KeypadComma;
|
||||||
|
public const CorsairLedId Keypad4 = CorsairLedId.Keypad4;
|
||||||
|
public const CorsairLedId Keypad5 = CorsairLedId.Keypad5;
|
||||||
|
public const CorsairLedId Keypad6 = CorsairLedId.Keypad6;
|
||||||
|
public const CorsairLedId Keypad1 = CorsairLedId.Keypad1;
|
||||||
|
public const CorsairLedId Keypad2 = CorsairLedId.Keypad2;
|
||||||
|
public const CorsairLedId Keypad3 = CorsairLedId.Keypad3;
|
||||||
|
public const CorsairLedId Keypad0 = CorsairLedId.Keypad0;
|
||||||
|
public const CorsairLedId KeypadPeriodAndDelete = CorsairLedId.KeypadPeriodAndDelete;
|
||||||
|
public const CorsairLedId G1 = CorsairLedId.G1;
|
||||||
|
public const CorsairLedId G2 = CorsairLedId.G2;
|
||||||
|
public const CorsairLedId G3 = CorsairLedId.G3;
|
||||||
|
public const CorsairLedId G4 = CorsairLedId.G4;
|
||||||
|
public const CorsairLedId G5 = CorsairLedId.G5;
|
||||||
|
public const CorsairLedId G6 = CorsairLedId.G6;
|
||||||
|
public const CorsairLedId G7 = CorsairLedId.G7;
|
||||||
|
public const CorsairLedId G8 = CorsairLedId.G8;
|
||||||
|
public const CorsairLedId G9 = CorsairLedId.G9;
|
||||||
|
public const CorsairLedId G10 = CorsairLedId.G10;
|
||||||
|
public const CorsairLedId VolumeUp = CorsairLedId.VolumeUp;
|
||||||
|
public const CorsairLedId VolumeDown = CorsairLedId.VolumeDown;
|
||||||
|
public const CorsairLedId MR = CorsairLedId.MR;
|
||||||
|
public const CorsairLedId M1 = CorsairLedId.M1;
|
||||||
|
public const CorsairLedId M2 = CorsairLedId.M2;
|
||||||
|
public const CorsairLedId M3 = CorsairLedId.M3;
|
||||||
|
public const CorsairLedId G11 = CorsairLedId.G11;
|
||||||
|
public const CorsairLedId G12 = CorsairLedId.G12;
|
||||||
|
public const CorsairLedId G13 = CorsairLedId.G13;
|
||||||
|
public const CorsairLedId G14 = CorsairLedId.G14;
|
||||||
|
public const CorsairLedId G15 = CorsairLedId.G15;
|
||||||
|
public const CorsairLedId G16 = CorsairLedId.G16;
|
||||||
|
public const CorsairLedId G17 = CorsairLedId.G17;
|
||||||
|
public const CorsairLedId G18 = CorsairLedId.G18;
|
||||||
|
public const CorsairLedId International5 = CorsairLedId.International5;
|
||||||
|
public const CorsairLedId International4 = CorsairLedId.International4;
|
||||||
|
public const CorsairLedId Fn = CorsairLedId.Fn;
|
||||||
|
public const CorsairLedId Logo = CorsairLedId.Logo;
|
||||||
|
}
|
||||||
|
}
|
||||||
@ -45,22 +45,22 @@ namespace CUE.NET.Devices.Mouse
|
|||||||
switch (MouseDeviceInfo.PhysicalLayout)
|
switch (MouseDeviceInfo.PhysicalLayout)
|
||||||
{
|
{
|
||||||
case CorsairPhysicalMouseLayout.Zones1:
|
case CorsairPhysicalMouseLayout.Zones1:
|
||||||
InitializeLed((CorsairLedId)CorsairMouseLedId.B1, new RectangleF(0, 0, 1, 1));
|
InitializeLed(CorsairMouseLedId.B1, new RectangleF(0, 0, 1, 1));
|
||||||
break;
|
break;
|
||||||
case CorsairPhysicalMouseLayout.Zones2:
|
case CorsairPhysicalMouseLayout.Zones2:
|
||||||
InitializeLed((CorsairLedId)CorsairMouseLedId.B1, new RectangleF(0, 0, 1, 1));
|
InitializeLed(CorsairMouseLedId.B1, new RectangleF(0, 0, 1, 1));
|
||||||
InitializeLed((CorsairLedId)CorsairMouseLedId.B2, new RectangleF(1, 0, 1, 1));
|
InitializeLed(CorsairMouseLedId.B2, new RectangleF(1, 0, 1, 1));
|
||||||
break;
|
break;
|
||||||
case CorsairPhysicalMouseLayout.Zones3:
|
case CorsairPhysicalMouseLayout.Zones3:
|
||||||
InitializeLed((CorsairLedId)CorsairMouseLedId.B1, new RectangleF(0, 0, 1, 1));
|
InitializeLed(CorsairMouseLedId.B1, new RectangleF(0, 0, 1, 1));
|
||||||
InitializeLed((CorsairLedId)CorsairMouseLedId.B2, new RectangleF(1, 0, 1, 1));
|
InitializeLed(CorsairMouseLedId.B2, new RectangleF(1, 0, 1, 1));
|
||||||
InitializeLed((CorsairLedId)CorsairMouseLedId.B3, new RectangleF(2, 0, 1, 1));
|
InitializeLed(CorsairMouseLedId.B3, new RectangleF(2, 0, 1, 1));
|
||||||
break;
|
break;
|
||||||
case CorsairPhysicalMouseLayout.Zones4:
|
case CorsairPhysicalMouseLayout.Zones4:
|
||||||
InitializeLed((CorsairLedId)CorsairMouseLedId.B1, new RectangleF(0, 0, 1, 1));
|
InitializeLed(CorsairMouseLedId.B1, new RectangleF(0, 0, 1, 1));
|
||||||
InitializeLed((CorsairLedId)CorsairMouseLedId.B2, new RectangleF(1, 0, 1, 1));
|
InitializeLed(CorsairMouseLedId.B2, new RectangleF(1, 0, 1, 1));
|
||||||
InitializeLed((CorsairLedId)CorsairMouseLedId.B3, new RectangleF(2, 0, 1, 1));
|
InitializeLed(CorsairMouseLedId.B3, new RectangleF(2, 0, 1, 1));
|
||||||
InitializeLed((CorsairLedId)CorsairMouseLedId.B4, new RectangleF(3, 0, 1, 1));
|
InitializeLed(CorsairMouseLedId.B4, new RectangleF(3, 0, 1, 1));
|
||||||
break;
|
break;
|
||||||
default:
|
default:
|
||||||
throw new WrapperException($"Can't initial mouse with layout '{MouseDeviceInfo.PhysicalLayout}'");
|
throw new WrapperException($"Can't initial mouse with layout '{MouseDeviceInfo.PhysicalLayout}'");
|
||||||
|
|||||||
@ -1,17 +0,0 @@
|
|||||||
// ReSharper disable UnusedMember.Global
|
|
||||||
// ReSharper disable InconsistentNaming
|
|
||||||
|
|
||||||
namespace CUE.NET.Devices.Mouse.Enums
|
|
||||||
{
|
|
||||||
/// <summary>
|
|
||||||
/// Contains list of all LEDs available for corsair mice.
|
|
||||||
/// </summary>
|
|
||||||
public enum CorsairMouseLedId
|
|
||||||
{
|
|
||||||
Invalid = 0,
|
|
||||||
B1 = 148,
|
|
||||||
B2 = 149,
|
|
||||||
B3 = 150,
|
|
||||||
B4 = 151
|
|
||||||
}
|
|
||||||
}
|
|
||||||
19
Devices/Mouse/Enums/CorsairMouseLedId.cs
Normal file
19
Devices/Mouse/Enums/CorsairMouseLedId.cs
Normal file
@ -0,0 +1,19 @@
|
|||||||
|
// ReSharper disable UnusedMember.Global
|
||||||
|
// ReSharper disable InconsistentNaming
|
||||||
|
|
||||||
|
using CUE.NET.Devices.Generic.Enums;
|
||||||
|
|
||||||
|
namespace CUE.NET.Devices.Mouse.Enums
|
||||||
|
{
|
||||||
|
/// <summary>
|
||||||
|
/// Contains list of all LEDs available for corsair mice.
|
||||||
|
/// </summary>
|
||||||
|
public static class CorsairMouseLedId
|
||||||
|
{
|
||||||
|
public const CorsairLedId Invalid = CorsairLedId.Invalid;
|
||||||
|
public const CorsairLedId B1 = CorsairLedId.B1;
|
||||||
|
public const CorsairLedId B2 = CorsairLedId.B2;
|
||||||
|
public const CorsairLedId B3 = CorsairLedId.B3;
|
||||||
|
public const CorsairLedId B4 = CorsairLedId.B4;
|
||||||
|
}
|
||||||
|
}
|
||||||
@ -1,25 +1,30 @@
|
|||||||
namespace CUE.NET.Devices.Mousemat.Enums
|
// ReSharper disable UnusedMember.Global
|
||||||
|
// ReSharper disable InconsistentNaming
|
||||||
|
|
||||||
|
using CUE.NET.Devices.Generic.Enums;
|
||||||
|
|
||||||
|
namespace CUE.NET.Devices.Mousemat.Enums
|
||||||
{
|
{
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Contains list of all LEDs available for corsair mousemats.
|
/// Contains list of all LEDs available for corsair mousemats.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public enum CorsairMousematLedId
|
public static class CorsairMousematLedId
|
||||||
{
|
{
|
||||||
Invalid = 0,
|
public const CorsairLedId Invalid = CorsairLedId.Invalid;
|
||||||
Zone1 = 155,
|
public const CorsairLedId Zone1 = CorsairLedId.Zone1;
|
||||||
Zone2 = 156,
|
public const CorsairLedId Zone2 = CorsairLedId.Zone2;
|
||||||
Zone3 = 157,
|
public const CorsairLedId Zone3 = CorsairLedId.Zone3;
|
||||||
Zone4 = 158,
|
public const CorsairLedId Zone4 = CorsairLedId.Zone4;
|
||||||
Zone5 = 159,
|
public const CorsairLedId Zone5 = CorsairLedId.Zone5;
|
||||||
Zone6 = 160,
|
public const CorsairLedId Zone6 = CorsairLedId.Zone6;
|
||||||
Zone7 = 161,
|
public const CorsairLedId Zone7 = CorsairLedId.Zone7;
|
||||||
Zone8 = 162,
|
public const CorsairLedId Zone8 = CorsairLedId.Zone8;
|
||||||
Zone9 = 163,
|
public const CorsairLedId Zone9 = CorsairLedId.Zone9;
|
||||||
Zone10 = 164,
|
public const CorsairLedId Zone10 = CorsairLedId.Zone10;
|
||||||
Zone11 = 165,
|
public const CorsairLedId Zone11 = CorsairLedId.Zone11;
|
||||||
Zone12 = 166,
|
public const CorsairLedId Zone12 = CorsairLedId.Zone12;
|
||||||
Zone13 = 167,
|
public const CorsairLedId Zone13 = CorsairLedId.Zone13;
|
||||||
Zone14 = 168,
|
public const CorsairLedId Zone14 = CorsairLedId.Zone14;
|
||||||
Zone15 = 169
|
public const CorsairLedId Zone15 = CorsairLedId.Zone15;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -77,23 +77,23 @@ namespace SimpleDevTest
|
|||||||
mousemat.UpdateMode = UpdateMode.Continuous;
|
mousemat.UpdateMode = UpdateMode.Continuous;
|
||||||
|
|
||||||
// Left
|
// Left
|
||||||
mousemat[(CorsairLedId)CorsairMousematLedId.Zone1].Color = Color.Red;
|
mousemat[CorsairMousematLedId.Zone1].Color = Color.Red;
|
||||||
mousemat[(CorsairLedId)CorsairMousematLedId.Zone2].Color = Color.Red;
|
mousemat[CorsairMousematLedId.Zone2].Color = Color.Red;
|
||||||
mousemat[(CorsairLedId)CorsairMousematLedId.Zone3].Color = Color.Red;
|
mousemat[CorsairMousematLedId.Zone3].Color = Color.Red;
|
||||||
mousemat[(CorsairLedId)CorsairMousematLedId.Zone4].Color = Color.Red;
|
mousemat[CorsairMousematLedId.Zone4].Color = Color.Red;
|
||||||
mousemat[(CorsairLedId)CorsairMousematLedId.Zone5].Color = Color.Red;
|
mousemat[CorsairMousematLedId.Zone5].Color = Color.Red;
|
||||||
// Bottom
|
// Bottom
|
||||||
mousemat[(CorsairLedId)CorsairMousematLedId.Zone6].Color = Color.LawnGreen;
|
mousemat[CorsairMousematLedId.Zone6].Color = Color.LawnGreen;
|
||||||
mousemat[(CorsairLedId)CorsairMousematLedId.Zone7].Color = Color.LawnGreen;
|
mousemat[CorsairMousematLedId.Zone7].Color = Color.LawnGreen;
|
||||||
mousemat[(CorsairLedId)CorsairMousematLedId.Zone8].Color = Color.LawnGreen;
|
mousemat[CorsairMousematLedId.Zone8].Color = Color.LawnGreen;
|
||||||
mousemat[(CorsairLedId)CorsairMousematLedId.Zone9].Color = Color.LawnGreen;
|
mousemat[CorsairMousematLedId.Zone9].Color = Color.LawnGreen;
|
||||||
mousemat[(CorsairLedId)CorsairMousematLedId.Zone10].Color = Color.LawnGreen;
|
mousemat[CorsairMousematLedId.Zone10].Color = Color.LawnGreen;
|
||||||
// Right
|
// Right
|
||||||
mousemat[(CorsairLedId)CorsairMousematLedId.Zone11].Color = Color.Blue;
|
mousemat[CorsairMousematLedId.Zone11].Color = Color.Blue;
|
||||||
mousemat[(CorsairLedId)CorsairMousematLedId.Zone12].Color = Color.Blue;
|
mousemat[CorsairMousematLedId.Zone12].Color = Color.Blue;
|
||||||
mousemat[(CorsairLedId)CorsairMousematLedId.Zone13].Color = Color.Blue;
|
mousemat[CorsairMousematLedId.Zone13].Color = Color.Blue;
|
||||||
mousemat[(CorsairLedId)CorsairMousematLedId.Zone14].Color = Color.Blue;
|
mousemat[CorsairMousematLedId.Zone14].Color = Color.Blue;
|
||||||
mousemat[(CorsairLedId)CorsairMousematLedId.Zone15].Color = Color.Blue;
|
mousemat[CorsairMousematLedId.Zone15].Color = Color.Blue;
|
||||||
|
|
||||||
// Random colors to show update rate
|
// Random colors to show update rate
|
||||||
//foreach (var mousematLed in mousemat.Leds)
|
//foreach (var mousematLed in mousemat.Leds)
|
||||||
|
|||||||
@ -105,7 +105,7 @@ namespace CUE.NET.Native
|
|||||||
private delegate IntPtr CorsairGetLedPositionsByDeviceIndexPointer(int deviceIndex);
|
private delegate IntPtr CorsairGetLedPositionsByDeviceIndexPointer(int deviceIndex);
|
||||||
|
|
||||||
[UnmanagedFunctionPointer(CallingConvention.Cdecl)]
|
[UnmanagedFunctionPointer(CallingConvention.Cdecl)]
|
||||||
private delegate CorsairKeyboardKeyId CorsairGetLedIdForKeyNamePointer(char keyName);
|
private delegate CorsairLedId CorsairGetLedIdForKeyNamePointer(char keyName);
|
||||||
|
|
||||||
[UnmanagedFunctionPointer(CallingConvention.Cdecl)]
|
[UnmanagedFunctionPointer(CallingConvention.Cdecl)]
|
||||||
private delegate bool CorsairRequestControlPointer(CorsairAccessMode accessMode);
|
private delegate bool CorsairRequestControlPointer(CorsairAccessMode accessMode);
|
||||||
@ -166,7 +166,7 @@ namespace CUE.NET.Native
|
|||||||
/// <summary>
|
/// <summary>
|
||||||
/// CUE-SDK: retrieves led id for key name taking logical layout into account.
|
/// CUE-SDK: retrieves led id for key name taking logical layout into account.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
internal static CorsairKeyboardKeyId CorsairGetLedIdForKeyName(char keyName)
|
internal static CorsairLedId CorsairGetLedIdForKeyName(char keyName)
|
||||||
{
|
{
|
||||||
return _corsairGetLedIdForKeyNamePointer(keyName);
|
return _corsairGetLedIdForKeyNamePointer(keyName);
|
||||||
}
|
}
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user