This repository has been archived by the owner on Aug 6, 2021. It is now read-only.
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Added an event to get the key-change of special keys (G and M)
- Loading branch information
Showing
8 changed files
with
198 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,46 @@ | ||
// ReSharper disable InconsistentNaming | ||
|
||
#pragma warning disable 1591 // Missing XML comment for publicly visible type or member | ||
|
||
namespace CUE.NET.Devices.Generic.Enums | ||
{ | ||
/// <summary> | ||
/// Contains list of all KeyIds available for all corsair devices. | ||
/// </summary> | ||
public enum CorsairKeyId | ||
{ | ||
Invalid = 0, | ||
|
||
G1 = 1, | ||
G2 = 2, | ||
G3 = 3, | ||
G4 = 4, | ||
G5 = 5, | ||
G6 = 6, | ||
G7 = 7, | ||
G8 = 8, | ||
G9 = 9, | ||
G10 = 10, | ||
G11 = 11, | ||
G12 = 12, | ||
G13 = 13, | ||
G14 = 14, | ||
G15 = 15, | ||
G16 = 16, | ||
G17 = 17, | ||
G18 = 18, | ||
|
||
M1 = 19, | ||
M2 = 20, | ||
M3 = 21, | ||
M4 = 22, | ||
M5 = 23, | ||
M6 = 24, | ||
M7 = 25, | ||
M8 = 26, | ||
M9 = 27, | ||
M10 = 28, | ||
M11 = 29, | ||
M12 = 30, | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,36 @@ | ||
// ReSharper disable UnusedMember.Global | ||
// ReSharper disable InconsistentNaming | ||
|
||
#pragma warning disable 1591 // Missing XML comment for publicly visible type or member | ||
|
||
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 CorsairKeyboardKeyId | ||
{ | ||
public const CorsairKeyId Invalid = CorsairKeyId.Invalid; | ||
|
||
public const CorsairKeyId G1 = CorsairKeyId.G1; | ||
public const CorsairKeyId G2 = CorsairKeyId.G2; | ||
public const CorsairKeyId G3 = CorsairKeyId.G3; | ||
public const CorsairKeyId G4 = CorsairKeyId.G4; | ||
public const CorsairKeyId G5 = CorsairKeyId.G5; | ||
public const CorsairKeyId G6 = CorsairKeyId.G6; | ||
public const CorsairKeyId G7 = CorsairKeyId.G7; | ||
public const CorsairKeyId G8 = CorsairKeyId.G8; | ||
public const CorsairKeyId G9 = CorsairKeyId.G9; | ||
public const CorsairKeyId G10 = CorsairKeyId.G10; | ||
public const CorsairKeyId G11 = CorsairKeyId.G11; | ||
public const CorsairKeyId G12 = CorsairKeyId.G12; | ||
public const CorsairKeyId G13 = CorsairKeyId.G13; | ||
public const CorsairKeyId G14 = CorsairKeyId.G14; | ||
public const CorsairKeyId G15 = CorsairKeyId.G15; | ||
public const CorsairKeyId G16 = CorsairKeyId.G16; | ||
public const CorsairKeyId G17 = CorsairKeyId.G17; | ||
public const CorsairKeyId G18 = CorsairKeyId.G18; | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,30 @@ | ||
// ReSharper disable UnusedMember.Global | ||
// ReSharper disable InconsistentNaming | ||
|
||
#pragma warning disable 1591 // Missing XML comment for publicly visible type or member | ||
|
||
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 CorsairMouseKeyId | ||
{ | ||
public const CorsairKeyId Invalid = CorsairKeyId.Invalid; | ||
|
||
public const CorsairKeyId M1 = CorsairKeyId.M1; | ||
public const CorsairKeyId M2 = CorsairKeyId.M2; | ||
public const CorsairKeyId M3 = CorsairKeyId.M3; | ||
public const CorsairKeyId M4 = CorsairKeyId.M4; | ||
public const CorsairKeyId M5 = CorsairKeyId.M5; | ||
public const CorsairKeyId M6 = CorsairKeyId.M6; | ||
public const CorsairKeyId M7 = CorsairKeyId.M7; | ||
public const CorsairKeyId M8 = CorsairKeyId.M8; | ||
public const CorsairKeyId M9 = CorsairKeyId.M9; | ||
public const CorsairKeyId M10 = CorsairKeyId.M10; | ||
public const CorsairKeyId M11 = CorsairKeyId.M11; | ||
public const CorsairKeyId M12 = CorsairKeyId.M12; | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,41 @@ | ||
// ReSharper disable MemberCanBePrivate.Global | ||
|
||
using CUE.NET.Devices.Generic.Enums; | ||
|
||
namespace CUE.NET.EventArgs | ||
{ | ||
/// <summary> | ||
/// Represents the data provided by the <see cref="CueSDK.KeyPressed"/>-event. | ||
/// </summary> | ||
public class KeyPressedEventArgs : System.EventArgs | ||
{ | ||
#region Properties & Fields | ||
|
||
/// <summary> | ||
/// Gets the id of the key. | ||
/// </summary> | ||
public CorsairKeyId KeyId { get; } | ||
|
||
/// <summary> | ||
/// Gets the current status of the key (true = pressed, flase = released). | ||
/// </summary> | ||
public bool IsPressed { get; } | ||
|
||
#endregion | ||
|
||
#region Constructors | ||
|
||
/// <summary> | ||
/// Initializes a new instance of the <see cref="KeyPressedEventArgs"/> class. | ||
/// </summary> | ||
/// <param name="keyId">The id of the key.</param> | ||
/// <param name="isPressed">The current status of the key (true = pressed, flase = released).</param> | ||
public KeyPressedEventArgs(CorsairKeyId keyId, bool isPressed) | ||
{ | ||
this.KeyId = keyId; | ||
this.IsPressed = isPressed; | ||
} | ||
|
||
#endregion | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters