mirror of
https://github.com/DarthAffe/RGB.NET.git
synced 2026-11-10 20:46:24 +00:00
Added physical-layout to KeyboardDeviceInfo
This commit is contained in:
1 parent
07a6d8952c
commit
190f5df025
16 files changed
+100
-50
No files matched your search
@@ -9,6 +9,12 @@ namespace RGB.NET.Devices.CoolerMaster
|
||||
/// </summary>
|
||||
public class CoolerMasterKeyboardRGBDevice : CoolerMasterRGBDevice<CoolerMasterKeyboardRGBDeviceInfo>, IKeyboard
|
||||
{
|
||||
#region Properties & Fields
|
||||
|
||||
IKeyboardDeviceInfo IKeyboard.DeviceInfo => DeviceInfo;
|
||||
|
||||
#endregion
|
||||
|
||||
#region Constructors
|
||||
|
||||
/// <inheritdoc />
|
||||
|
||||
@@ -2,14 +2,16 @@
|
||||
|
||||
namespace RGB.NET.Devices.CoolerMaster
|
||||
{
|
||||
/// <inheritdoc />
|
||||
/// <summary>
|
||||
/// Represents a generic information for a <see cref="T:RGB.NET.Devices.CoolerMaster.CoolerMasterKeyboardRGBDevice" />.
|
||||
/// </summary>
|
||||
public class CoolerMasterKeyboardRGBDeviceInfo : CoolerMasterRGBDeviceInfo
|
||||
public class CoolerMasterKeyboardRGBDeviceInfo : CoolerMasterRGBDeviceInfo, IKeyboardDeviceInfo
|
||||
{
|
||||
#region Properties & Fields
|
||||
|
||||
/// <inheritdoc />
|
||||
public KeyboardLayoutType Layout { get; }
|
||||
|
||||
/// <summary>
|
||||
/// Gets the <see cref="CoolerMasterPhysicalKeyboardLayout"/> of the <see cref="CoolerMasterKeyboardRGBDevice"/>.
|
||||
/// </summary>
|
||||
@@ -29,6 +31,14 @@ namespace RGB.NET.Devices.CoolerMaster
|
||||
: base(RGBDeviceType.Keyboard, deviceIndex)
|
||||
{
|
||||
this.PhysicalLayout = physicalKeyboardLayout;
|
||||
this.Layout = physicalKeyboardLayout switch
|
||||
{
|
||||
CoolerMasterPhysicalKeyboardLayout.UNINIT => KeyboardLayoutType.Unknown,
|
||||
CoolerMasterPhysicalKeyboardLayout.US => KeyboardLayoutType.Ansi,
|
||||
CoolerMasterPhysicalKeyboardLayout.EU => KeyboardLayoutType.Iso,
|
||||
CoolerMasterPhysicalKeyboardLayout.JP => KeyboardLayoutType.Jis,
|
||||
_ => KeyboardLayoutType.Unknown
|
||||
};
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
Reference in new issue
Block a user