mirror of
https://github.com/DarthAffe/RGB.NET.git
synced 2026-11-10 20:46:24 +00:00
Merge branch 'Development' into Core/Rendering
This commit is contained in:
commit
6d7b7ad2e2
16 files changed
+103
-50
No files matched your search
@@ -15,6 +15,12 @@ namespace RGB.NET.Devices.Corsair
|
||||
/// </summary>
|
||||
public class CorsairKeyboardRGBDevice : CorsairRGBDevice<CorsairKeyboardRGBDeviceInfo>, IKeyboard
|
||||
{
|
||||
#region Properties & Fields
|
||||
|
||||
IKeyboardDeviceInfo IKeyboard.DeviceInfo => DeviceInfo;
|
||||
|
||||
#endregion
|
||||
|
||||
#region Constructors
|
||||
|
||||
/// <inheritdoc />
|
||||
|
||||
@@ -7,14 +7,16 @@ using RGB.NET.Devices.Corsair.Native;
|
||||
|
||||
namespace RGB.NET.Devices.Corsair
|
||||
{
|
||||
/// <inheritdoc />
|
||||
/// <summary>
|
||||
/// Represents a generic information for a <see cref="T:RGB.NET.Devices.Corsair.CorsairKeyboardRGBDevice" />.
|
||||
/// </summary>
|
||||
public class CorsairKeyboardRGBDeviceInfo : CorsairRGBDeviceInfo
|
||||
public class CorsairKeyboardRGBDeviceInfo : CorsairRGBDeviceInfo, IKeyboardDeviceInfo
|
||||
{
|
||||
#region Properties & Fields
|
||||
|
||||
/// <inheritdoc />
|
||||
public KeyboardLayoutType Layout { get; }
|
||||
|
||||
/// <summary>
|
||||
/// Gets the physical layout of the keyboard.
|
||||
/// </summary>
|
||||
@@ -41,6 +43,15 @@ namespace RGB.NET.Devices.Corsair
|
||||
{
|
||||
this.PhysicalLayout = (CorsairPhysicalKeyboardLayout)nativeInfo.physicalLayout;
|
||||
this.LogicalLayout = (CorsairLogicalKeyboardLayout)nativeInfo.logicalLayout;
|
||||
this.Layout = PhysicalLayout switch
|
||||
{
|
||||
CorsairPhysicalKeyboardLayout.US => KeyboardLayoutType.ANSI,
|
||||
CorsairPhysicalKeyboardLayout.UK => KeyboardLayoutType.ISO,
|
||||
CorsairPhysicalKeyboardLayout.BR => KeyboardLayoutType.ABNT,
|
||||
CorsairPhysicalKeyboardLayout.JP => KeyboardLayoutType.JIS,
|
||||
CorsairPhysicalKeyboardLayout.KR => KeyboardLayoutType.KS,
|
||||
_ => KeyboardLayoutType.Unknown
|
||||
};
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
Reference in new issue
Block a user