-
Notifications
You must be signed in to change notification settings - Fork 76
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
10 changed files
with
150 additions
and
74 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,24 +1,29 @@ | ||
// ReSharper disable InconsistentNaming | ||
|
||
namespace RGB.NET.Devices.Wooting.Enum; | ||
|
||
/// <summary> | ||
/// Represents the type of a wooting device | ||
/// </summary> | ||
public enum WootingDeviceType | ||
{ | ||
/// <summary> | ||
/// 10 Keyless Keyboard. E.g. Wooting One | ||
/// </summary> | ||
KeyboardTKL = 1, | ||
|
||
/// <summary> | ||
/// Full Size keyboard. E.g. Wooting Two | ||
/// </summary> | ||
// ReSharper disable InconsistentNaming | ||
|
||
namespace RGB.NET.Devices.Wooting.Enum; | ||
|
||
/// <summary> | ||
/// Represents the type of a wooting device | ||
/// </summary> | ||
public enum WootingDeviceType | ||
{ | ||
/// <summary> | ||
/// 10 Keyless Keyboard. E.g. Wooting One | ||
/// </summary> | ||
KeyboardTKL = 1, | ||
|
||
/// <summary> | ||
/// Full Size keyboard. E.g. Wooting Two | ||
/// </summary> | ||
Keyboard = 2, | ||
|
||
/// <summary> | ||
/// Full Size keyboard. E.g. Wooting Two | ||
/// </summary> | ||
KeyboardSixtyPercent = 3 | ||
/// <summary> | ||
/// 60 percent keyboard, E.g. Wooting 60HE | ||
/// </summary> | ||
KeyboardSixtyPercent = 3, | ||
|
||
/// <summary> | ||
/// Three key keypad. E.g. Wooting Uwu | ||
/// </summary> | ||
Keypad3Keys = 4, | ||
} |
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
This file was deleted.
Oops, something went wrong.
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,44 @@ | ||
using System.Collections.Generic; | ||
using RGB.NET.Core; | ||
using RGB.NET.Devices.Wooting.Generic; | ||
using RGB.NET.Devices.Wooting.Keyboard; | ||
|
||
namespace RGB.NET.Devices.Wooting.Keypad; | ||
|
||
/// <inheritdoc cref="WootingRGBDevice{TDeviceInfo}" /> | ||
/// <summary> | ||
/// Represents a Wooting keyboard. | ||
/// </summary> | ||
public sealed class WootingKeypadRGBDevice : WootingRGBDevice<WootingKeypadRGBDeviceInfo>, IKeypad | ||
{ | ||
#region Constructors | ||
|
||
/// <inheritdoc /> | ||
/// <summary> | ||
/// Initializes a new instance of the <see cref="T:RGB.NET.Devices.Wooting.Keyboard.WootingKeypadRGBDevice" /> class. | ||
/// </summary> | ||
/// <param name="info">The specific information provided by Wooting for the keyboard</param> | ||
/// <param name="updateQueue">The update queue used to update this device.</param> | ||
internal WootingKeypadRGBDevice(WootingKeypadRGBDeviceInfo info, IUpdateQueue updateQueue) | ||
: base(info, updateQueue) | ||
{ | ||
InitializeLayout(); | ||
} | ||
|
||
#endregion | ||
|
||
#region Methods | ||
|
||
private void InitializeLayout() | ||
{ | ||
Dictionary<LedId, (int row, int column)> mapping = WootingLedMappings.Mapping[DeviceInfo.WootingDeviceType]; | ||
|
||
foreach (KeyValuePair<LedId, (int row, int column)> led in mapping) | ||
AddLed(led.Key, new Point(led.Value.column * 19, led.Value.row * 19), new Size(19, 19)); | ||
} | ||
|
||
/// <inheritdoc /> | ||
protected override object GetLedCustomData(LedId ledId) => WootingLedMappings.Mapping[DeviceInfo.WootingDeviceType][ledId]; | ||
|
||
#endregion | ||
} |
17 changes: 17 additions & 0 deletions
17
RGB.NET.Devices.Wooting/Keypad/WootingKeypadRGBDeviceInfo.cs
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,17 @@ | ||
using RGB.NET.Core; | ||
using RGB.NET.Devices.Wooting.Generic; | ||
using RGB.NET.Devices.Wooting.Native; | ||
|
||
namespace RGB.NET.Devices.Wooting.Keypad; | ||
|
||
/// <summary> | ||
/// Represents a generic information for a <see cref="T:RGB.NET.Devices.Wooting.Keypad.WootingKeypadRGBDevice" />. | ||
/// </summary> | ||
public sealed class WootingKeypadRGBDeviceInfo : WootingRGBDeviceInfo | ||
{ | ||
internal WootingKeypadRGBDeviceInfo(_WootingDeviceInfo deviceInfo, byte deviceIndex) | ||
: base(RGBDeviceType.Keypad, deviceInfo, deviceIndex) | ||
{ | ||
|
||
} | ||
} |
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