mirror of
https://github.com/Artemis-RGB/Artemis
synced 2026-01-01 10:13:30 +00:00
Fixed CUE.NET implementation to actually use the Nuget package
This commit is contained in:
parent
182d710d16
commit
310bd52efc
@ -160,7 +160,6 @@
|
|||||||
<Private>True</Private>
|
<Private>True</Private>
|
||||||
</Reference>
|
</Reference>
|
||||||
<Reference Include="CUE.NET, Version=1.1.1.0, Culture=neutral, processorArchitecture=MSIL">
|
<Reference Include="CUE.NET, Version=1.1.1.0, Culture=neutral, processorArchitecture=MSIL">
|
||||||
<SpecificVersion>False</SpecificVersion>
|
|
||||||
<HintPath>..\packages\CUE.NET.1.1.1\lib\net45\CUE.NET.dll</HintPath>
|
<HintPath>..\packages\CUE.NET.1.1.1\lib\net45\CUE.NET.dll</HintPath>
|
||||||
<Private>True</Private>
|
<Private>True</Private>
|
||||||
</Reference>
|
</Reference>
|
||||||
|
|||||||
@ -1,80 +1,80 @@
|
|||||||
using System;
|
using System;
|
||||||
using System.Drawing;
|
using System.Drawing;
|
||||||
using System.Linq;
|
using System.Linq;
|
||||||
using System.Threading;
|
using System.Threading;
|
||||||
using CUE.NET;
|
using CUE.NET;
|
||||||
using CUE.NET.Devices.Generic.Enums;
|
using CUE.NET.Devices.Generic.Enums;
|
||||||
using Ninject.Extensions.Logging;
|
using Ninject.Extensions.Logging;
|
||||||
|
|
||||||
namespace Artemis.DeviceProviders.Corsair
|
namespace Artemis.DeviceProviders.Corsair
|
||||||
{
|
{
|
||||||
public class CorsairHeadset : DeviceProvider
|
public class CorsairHeadset : DeviceProvider
|
||||||
{
|
{
|
||||||
public CorsairHeadset(ILogger logger)
|
public CorsairHeadset(ILogger logger)
|
||||||
{
|
{
|
||||||
Logger = logger;
|
Logger = logger;
|
||||||
Type = DeviceType.Headset;
|
Type = DeviceType.Headset;
|
||||||
}
|
}
|
||||||
|
|
||||||
public ILogger Logger { get; set; }
|
public ILogger Logger { get; set; }
|
||||||
|
|
||||||
public override bool TryEnable()
|
public override bool TryEnable()
|
||||||
{
|
{
|
||||||
CanUse = CanInitializeSdk();
|
CanUse = CanInitializeSdk();
|
||||||
if (CanUse && !CueSDK.IsInitialized)
|
if (CanUse && !CueSDK.IsInitialized)
|
||||||
CueSDK.Initialize();
|
CueSDK.Initialize();
|
||||||
|
|
||||||
Logger.Debug("Attempted to enable Corsair headset. CanUse: {0}", CanUse);
|
Logger.Debug("Attempted to enable Corsair headset. CanUse: {0}", CanUse);
|
||||||
|
|
||||||
if (CanUse)
|
if (CanUse)
|
||||||
CueSDK.HeadsetSDK.UpdateMode = UpdateMode.Manual;
|
CueSDK.UpdateMode = UpdateMode.Manual;
|
||||||
|
|
||||||
return CanUse;
|
return CanUse;
|
||||||
}
|
}
|
||||||
|
|
||||||
public override void Disable()
|
public override void Disable()
|
||||||
{
|
{
|
||||||
throw new NotSupportedException("Can only disable a keyboard");
|
throw new NotSupportedException("Can only disable a keyboard");
|
||||||
}
|
}
|
||||||
|
|
||||||
public override void UpdateDevice(Bitmap bitmap)
|
public override void UpdateDevice(Bitmap bitmap)
|
||||||
{
|
{
|
||||||
if (!CanUse || bitmap == null)
|
if (!CanUse || bitmap == null)
|
||||||
return;
|
return;
|
||||||
if (bitmap.Width != bitmap.Height)
|
if (bitmap.Width != bitmap.Height)
|
||||||
throw new ArgumentException("Bitmap must be a perfect square");
|
throw new ArgumentException("Bitmap must be a perfect square");
|
||||||
|
|
||||||
var leds = CueSDK.HeadsetSDK.Leds.Count();
|
var leds = CueSDK.HeadsetSDK.Leds.Count();
|
||||||
var step = (double) bitmap.Width/leds;
|
var step = (double)bitmap.Width / leds;
|
||||||
|
|
||||||
var ledIndex = 0;
|
var ledIndex = 0;
|
||||||
// Color each LED according to one of the pixels
|
// Color each LED according to one of the pixels
|
||||||
foreach (var corsairLed in CueSDK.HeadsetSDK.Leds)
|
foreach (var corsairLed in CueSDK.HeadsetSDK.Leds)
|
||||||
{
|
{
|
||||||
var col = ledIndex == 0
|
var col = ledIndex == 0
|
||||||
? bitmap.GetPixel(0, 0)
|
? bitmap.GetPixel(0, 0)
|
||||||
: bitmap.GetPixel((int) ((ledIndex + 1)*step - 1), (int) ((ledIndex + 1)*step - 1));
|
: bitmap.GetPixel((int)((ledIndex + 1) * step - 1), (int)((ledIndex + 1) * step - 1));
|
||||||
|
|
||||||
corsairLed.Color = col;
|
corsairLed.Color = col;
|
||||||
ledIndex++;
|
ledIndex++;
|
||||||
}
|
}
|
||||||
|
|
||||||
CueSDK.HeadsetSDK.Update();
|
CueSDK.HeadsetSDK.Update();
|
||||||
}
|
}
|
||||||
|
|
||||||
private static bool CanInitializeSdk()
|
private static bool CanInitializeSdk()
|
||||||
{
|
{
|
||||||
// This will skip the check-loop if the SDK is initialized
|
// This will skip the check-loop if the SDK is initialized
|
||||||
if (CueSDK.IsInitialized)
|
if (CueSDK.IsInitialized)
|
||||||
return CueSDK.IsSDKAvailable(CorsairDeviceType.Headset);
|
return CueSDK.IsSDKAvailable(CorsairDeviceType.Headset);
|
||||||
|
|
||||||
for (var tries = 0; tries < 9; tries++)
|
for (var tries = 0; tries < 9; tries++)
|
||||||
{
|
{
|
||||||
if (CueSDK.IsSDKAvailable(CorsairDeviceType.Headset))
|
if (CueSDK.IsSDKAvailable(CorsairDeviceType.Headset))
|
||||||
return true;
|
return true;
|
||||||
Thread.Sleep(2000);
|
Thread.Sleep(2000);
|
||||||
}
|
}
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -8,8 +8,8 @@ using Artemis.Properties;
|
|||||||
using Artemis.Utilities;
|
using Artemis.Utilities;
|
||||||
using CUE.NET;
|
using CUE.NET;
|
||||||
using CUE.NET.Brushes;
|
using CUE.NET.Brushes;
|
||||||
|
using CUE.NET.Devices.Generic;
|
||||||
using CUE.NET.Devices.Generic.Enums;
|
using CUE.NET.Devices.Generic.Enums;
|
||||||
using CUE.NET.Devices.Keyboard.Keys;
|
|
||||||
using CUE.NET.Exceptions;
|
using CUE.NET.Exceptions;
|
||||||
using CUE.NET.Helper;
|
using CUE.NET.Helper;
|
||||||
using Ninject.Extensions.Logging;
|
using Ninject.Extensions.Logging;
|
||||||
@ -47,7 +47,7 @@ namespace Artemis.DeviceProviders.Corsair
|
|||||||
if (!CueSDK.IsInitialized)
|
if (!CueSDK.IsInitialized)
|
||||||
CueSDK.Initialize();
|
CueSDK.Initialize();
|
||||||
|
|
||||||
CueSDK.KeyboardSDK.UpdateMode = UpdateMode.Manual;
|
CueSDK.UpdateMode = UpdateMode.Manual;
|
||||||
_keyboard = CueSDK.KeyboardSDK;
|
_keyboard = CueSDK.KeyboardSDK;
|
||||||
switch (_keyboard.DeviceInfo.Model)
|
switch (_keyboard.DeviceInfo.Model)
|
||||||
{
|
{
|
||||||
@ -136,25 +136,25 @@ namespace Artemis.DeviceProviders.Corsair
|
|||||||
|
|
||||||
public override KeyMatch? GetKeyPosition(Keys keyCode)
|
public override KeyMatch? GetKeyPosition(Keys keyCode)
|
||||||
{
|
{
|
||||||
var widthMultiplier = Width / _keyboard.KeyboardRectangle.Width;
|
var widthMultiplier = Width / _keyboard.Brush.RenderedRectangle.Width;
|
||||||
var heightMultiplier = Height / _keyboard.KeyboardRectangle.Height;
|
var heightMultiplier = Height / _keyboard.Brush.RenderedRectangle.Height;
|
||||||
|
|
||||||
CorsairKey cueKey = null;
|
CorsairLed cueLed = null;
|
||||||
try
|
try
|
||||||
{
|
{
|
||||||
cueKey = _keyboard.Keys.FirstOrDefault(k => k.KeyId.ToString() == keyCode.ToString()) ??
|
cueLed = _keyboard.Leds.FirstOrDefault(k => k.Id.ToString() == keyCode.ToString()) ??
|
||||||
_keyboard.Keys.FirstOrDefault(k => k.KeyId == KeyMap.FormsKeys[keyCode]);
|
_keyboard.Leds.FirstOrDefault(k => k.Id == KeyMap.FormsKeys[keyCode]);
|
||||||
}
|
}
|
||||||
catch (Exception)
|
catch (Exception)
|
||||||
{
|
{
|
||||||
// ignored
|
// ignored
|
||||||
}
|
}
|
||||||
|
|
||||||
if (cueKey == null)
|
if (cueLed == null)
|
||||||
return null;
|
return null;
|
||||||
|
|
||||||
var center = cueKey.KeyRectangle.GetCenter();
|
var center = cueLed.LedRectangle.GetCenter();
|
||||||
return new KeyMatch(keyCode, (int) (center.X * widthMultiplier), (int) (center.Y * heightMultiplier));
|
return new KeyMatch(keyCode, (int)(center.X * widthMultiplier), (int)(center.Y * heightMultiplier));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -1,80 +1,80 @@
|
|||||||
using System;
|
using System;
|
||||||
using System.Drawing;
|
using System.Drawing;
|
||||||
using System.Linq;
|
using System.Linq;
|
||||||
using System.Threading;
|
using System.Threading;
|
||||||
using CUE.NET;
|
using CUE.NET;
|
||||||
using CUE.NET.Devices.Generic.Enums;
|
using CUE.NET.Devices.Generic.Enums;
|
||||||
using Ninject.Extensions.Logging;
|
using Ninject.Extensions.Logging;
|
||||||
|
|
||||||
namespace Artemis.DeviceProviders.Corsair
|
namespace Artemis.DeviceProviders.Corsair
|
||||||
{
|
{
|
||||||
public class CorsairMouse : DeviceProvider
|
public class CorsairMouse : DeviceProvider
|
||||||
{
|
{
|
||||||
public CorsairMouse(ILogger logger)
|
public CorsairMouse(ILogger logger)
|
||||||
{
|
{
|
||||||
Logger = logger;
|
Logger = logger;
|
||||||
Type = DeviceType.Mouse;
|
Type = DeviceType.Mouse;
|
||||||
}
|
}
|
||||||
|
|
||||||
public ILogger Logger { get; set; }
|
public ILogger Logger { get; set; }
|
||||||
|
|
||||||
public override bool TryEnable()
|
public override bool TryEnable()
|
||||||
{
|
{
|
||||||
CanUse = CanInitializeSdk();
|
CanUse = CanInitializeSdk();
|
||||||
if (CanUse && !CueSDK.IsInitialized)
|
if (CanUse && !CueSDK.IsInitialized)
|
||||||
CueSDK.Initialize();
|
CueSDK.Initialize();
|
||||||
|
|
||||||
Logger.Debug("Attempted to enable Corsair mice. CanUse: {0}", CanUse);
|
Logger.Debug("Attempted to enable Corsair mice. CanUse: {0}", CanUse);
|
||||||
|
|
||||||
if (CanUse)
|
if (CanUse)
|
||||||
CueSDK.MouseSDK.UpdateMode = UpdateMode.Manual;
|
CueSDK.UpdateMode = UpdateMode.Manual;
|
||||||
|
|
||||||
return CanUse;
|
return CanUse;
|
||||||
}
|
}
|
||||||
|
|
||||||
public override void Disable()
|
public override void Disable()
|
||||||
{
|
{
|
||||||
throw new NotSupportedException("Can only disable a keyboard");
|
throw new NotSupportedException("Can only disable a keyboard");
|
||||||
}
|
}
|
||||||
|
|
||||||
public override void UpdateDevice(Bitmap bitmap)
|
public override void UpdateDevice(Bitmap bitmap)
|
||||||
{
|
{
|
||||||
if (!CanUse || bitmap == null)
|
if (!CanUse || bitmap == null)
|
||||||
return;
|
return;
|
||||||
if (bitmap.Width != bitmap.Height)
|
if (bitmap.Width != bitmap.Height)
|
||||||
throw new ArgumentException("Bitmap must be a perfect square");
|
throw new ArgumentException("Bitmap must be a perfect square");
|
||||||
|
|
||||||
var leds = CueSDK.MouseSDK.Leds.Count();
|
var leds = CueSDK.MouseSDK.Leds.Count();
|
||||||
var step = (double) bitmap.Width/leds;
|
var step = (double)bitmap.Width / leds;
|
||||||
|
|
||||||
var ledIndex = 0;
|
var ledIndex = 0;
|
||||||
// Color each LED according to one of the pixels
|
// Color each LED according to one of the pixels
|
||||||
foreach (var corsairLed in CueSDK.MouseSDK.Leds)
|
foreach (var corsairLed in CueSDK.MouseSDK.Leds)
|
||||||
{
|
{
|
||||||
var col = ledIndex == 0
|
var col = ledIndex == 0
|
||||||
? bitmap.GetPixel(0, 0)
|
? bitmap.GetPixel(0, 0)
|
||||||
: bitmap.GetPixel((int) ((ledIndex + 1)*step - 1), (int) ((ledIndex + 1)*step - 1));
|
: bitmap.GetPixel((int)((ledIndex + 1) * step - 1), (int)((ledIndex + 1) * step - 1));
|
||||||
|
|
||||||
corsairLed.Color = col;
|
corsairLed.Color = col;
|
||||||
ledIndex++;
|
ledIndex++;
|
||||||
}
|
}
|
||||||
|
|
||||||
CueSDK.MouseSDK.Update();
|
CueSDK.MouseSDK.Update();
|
||||||
}
|
}
|
||||||
|
|
||||||
private static bool CanInitializeSdk()
|
private static bool CanInitializeSdk()
|
||||||
{
|
{
|
||||||
// This will skip the check-loop if the SDK is initialized
|
// This will skip the check-loop if the SDK is initialized
|
||||||
if (CueSDK.IsInitialized)
|
if (CueSDK.IsInitialized)
|
||||||
return CueSDK.IsSDKAvailable(CorsairDeviceType.Mouse);
|
return CueSDK.IsSDKAvailable(CorsairDeviceType.Mouse);
|
||||||
|
|
||||||
for (var tries = 0; tries < 9; tries++)
|
for (var tries = 0; tries < 9; tries++)
|
||||||
{
|
{
|
||||||
if (CueSDK.IsSDKAvailable(CorsairDeviceType.Mouse))
|
if (CueSDK.IsSDKAvailable(CorsairDeviceType.Mouse))
|
||||||
return true;
|
return true;
|
||||||
Thread.Sleep(2000);
|
Thread.Sleep(2000);
|
||||||
}
|
}
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -1,100 +1,100 @@
|
|||||||
using System;
|
using System;
|
||||||
using System.Drawing;
|
using System.Drawing;
|
||||||
using System.Linq;
|
using System.Linq;
|
||||||
using System.Threading;
|
using System.Threading;
|
||||||
using CUE.NET;
|
using CUE.NET;
|
||||||
using CUE.NET.Devices.Generic.Enums;
|
using CUE.NET.Devices.Generic.Enums;
|
||||||
using Ninject.Extensions.Logging;
|
using Ninject.Extensions.Logging;
|
||||||
|
|
||||||
namespace Artemis.DeviceProviders.Corsair
|
namespace Artemis.DeviceProviders.Corsair
|
||||||
{
|
{
|
||||||
public class CorsairMousemat : DeviceProvider
|
public class CorsairMousemat : DeviceProvider
|
||||||
{
|
{
|
||||||
public CorsairMousemat(ILogger logger)
|
public CorsairMousemat(ILogger logger)
|
||||||
{
|
{
|
||||||
Logger = logger;
|
Logger = logger;
|
||||||
Type = DeviceType.Mousemat;
|
Type = DeviceType.Mousemat;
|
||||||
}
|
}
|
||||||
|
|
||||||
public ILogger Logger { get; set; }
|
public ILogger Logger { get; set; }
|
||||||
|
|
||||||
public override bool TryEnable()
|
public override bool TryEnable()
|
||||||
{
|
{
|
||||||
CanUse = CanInitializeSdk();
|
CanUse = CanInitializeSdk();
|
||||||
if (CanUse && !CueSDK.IsInitialized)
|
if (CanUse && !CueSDK.IsInitialized)
|
||||||
CueSDK.Initialize();
|
CueSDK.Initialize();
|
||||||
|
|
||||||
Logger.Debug("Attempted to enable Corsair mousemat. CanUse: {0}", CanUse);
|
Logger.Debug("Attempted to enable Corsair mousemat. CanUse: {0}", CanUse);
|
||||||
|
|
||||||
if (CanUse)
|
if (CanUse)
|
||||||
CueSDK.MousematSDK.UpdateMode = UpdateMode.Manual;
|
CueSDK.UpdateMode = UpdateMode.Manual;
|
||||||
|
|
||||||
return CanUse;
|
return CanUse;
|
||||||
}
|
}
|
||||||
|
|
||||||
public override void Disable()
|
public override void Disable()
|
||||||
{
|
{
|
||||||
throw new NotSupportedException("Can only disable a keyboard");
|
throw new NotSupportedException("Can only disable a keyboard");
|
||||||
}
|
}
|
||||||
|
|
||||||
public override void UpdateDevice(Bitmap bitmap)
|
public override void UpdateDevice(Bitmap bitmap)
|
||||||
{
|
{
|
||||||
if (!CanUse || (bitmap == null))
|
if (!CanUse || (bitmap == null))
|
||||||
return;
|
return;
|
||||||
if (bitmap.Width != bitmap.Height)
|
if (bitmap.Width != bitmap.Height)
|
||||||
throw new ArgumentException("Bitmap must be a perfect square");
|
throw new ArgumentException("Bitmap must be a perfect square");
|
||||||
|
|
||||||
var yStep = (double) bitmap.Width/4;
|
var yStep = (double)bitmap.Width / 4;
|
||||||
var xStep = (double) bitmap.Width/6;
|
var xStep = (double)bitmap.Width / 6;
|
||||||
|
|
||||||
// This approach will break if any mousemats with different LED amounts are released, for now it will do.
|
// This approach will break if any mousemats with different LED amounts are released, for now it will do.
|
||||||
var ledIndex = 0;
|
var ledIndex = 0;
|
||||||
// Color each LED according to one of the pixels
|
// Color each LED according to one of the pixels
|
||||||
foreach (var corsairLed in CueSDK.MousematSDK.Leds.OrderBy(l => l.ToString()))
|
foreach (var corsairLed in CueSDK.MousematSDK.Leds.OrderBy(l => l.ToString()))
|
||||||
{
|
{
|
||||||
Color col;
|
Color col;
|
||||||
// Left side
|
// Left side
|
||||||
if (ledIndex < 5)
|
if (ledIndex < 5)
|
||||||
{
|
{
|
||||||
col = ledIndex == 0
|
col = ledIndex == 0
|
||||||
? bitmap.GetPixel(0, (int) (ledIndex*yStep))
|
? bitmap.GetPixel(0, (int)(ledIndex * yStep))
|
||||||
: bitmap.GetPixel(0, (int) (ledIndex*yStep) - 1);
|
: bitmap.GetPixel(0, (int)(ledIndex * yStep) - 1);
|
||||||
}
|
}
|
||||||
// Bottom
|
// Bottom
|
||||||
else if (ledIndex < 10)
|
else if (ledIndex < 10)
|
||||||
{
|
{
|
||||||
// Start at index 1 because the corner belongs to the left side
|
// Start at index 1 because the corner belongs to the left side
|
||||||
var zoneIndex = ledIndex - 4;
|
var zoneIndex = ledIndex - 4;
|
||||||
col = bitmap.GetPixel((int) (zoneIndex*xStep), bitmap.Height - 1);
|
col = bitmap.GetPixel((int)(zoneIndex * xStep), bitmap.Height - 1);
|
||||||
}
|
}
|
||||||
// Right side
|
// Right side
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
var zoneIndex = ledIndex - 10;
|
var zoneIndex = ledIndex - 10;
|
||||||
col = zoneIndex == 4
|
col = zoneIndex == 4
|
||||||
? bitmap.GetPixel(bitmap.Height - 1, bitmap.Height - (int) (zoneIndex*yStep))
|
? bitmap.GetPixel(bitmap.Height - 1, bitmap.Height - (int)(zoneIndex * yStep))
|
||||||
: bitmap.GetPixel(bitmap.Height - 1, bitmap.Height - 1 - (int) (zoneIndex*yStep));
|
: bitmap.GetPixel(bitmap.Height - 1, bitmap.Height - 1 - (int)(zoneIndex * yStep));
|
||||||
}
|
}
|
||||||
|
|
||||||
corsairLed.Color = col;
|
corsairLed.Color = col;
|
||||||
ledIndex++;
|
ledIndex++;
|
||||||
}
|
}
|
||||||
CueSDK.MousematSDK.Update();
|
CueSDK.MousematSDK.Update();
|
||||||
}
|
}
|
||||||
|
|
||||||
private static bool CanInitializeSdk()
|
private static bool CanInitializeSdk()
|
||||||
{
|
{
|
||||||
// This will skip the check-loop if the SDK is initialized
|
// This will skip the check-loop if the SDK is initialized
|
||||||
if (CueSDK.IsInitialized)
|
if (CueSDK.IsInitialized)
|
||||||
return CueSDK.IsSDKAvailable(CorsairDeviceType.Mousemat);
|
return CueSDK.IsSDKAvailable(CorsairDeviceType.Mousemat);
|
||||||
|
|
||||||
for (var tries = 0; tries < 9; tries++)
|
for (var tries = 0; tries < 9; tries++)
|
||||||
{
|
{
|
||||||
if (CueSDK.IsSDKAvailable(CorsairDeviceType.Mousemat))
|
if (CueSDK.IsSDKAvailable(CorsairDeviceType.Mousemat))
|
||||||
return true;
|
return true;
|
||||||
Thread.Sleep(2000);
|
Thread.Sleep(2000);
|
||||||
}
|
}
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -1,71 +1,71 @@
|
|||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
using System.Windows.Forms;
|
using System.Windows.Forms;
|
||||||
using CUE.NET.Devices.Keyboard.Enums;
|
using CUE.NET.Devices.Generic.Enums;
|
||||||
|
|
||||||
namespace Artemis.DeviceProviders.Corsair.Utilities
|
namespace Artemis.DeviceProviders.Corsair.Utilities
|
||||||
{
|
{
|
||||||
public static class KeyMap
|
public static class KeyMap
|
||||||
{
|
{
|
||||||
static KeyMap()
|
static KeyMap()
|
||||||
{
|
{
|
||||||
FormsKeys = new Dictionary<Keys, CorsairKeyboardKeyId>
|
FormsKeys = new Dictionary<Keys, CorsairLedId>
|
||||||
{
|
{
|
||||||
{Keys.Scroll, CorsairKeyboardKeyId.ScrollLock},
|
{Keys.Scroll, CorsairLedId.ScrollLock},
|
||||||
{Keys.Pause, CorsairKeyboardKeyId.PauseBreak},
|
{Keys.Pause, CorsairLedId.PauseBreak},
|
||||||
{Keys.Back, CorsairKeyboardKeyId.Backspace},
|
{Keys.Back, CorsairLedId.Backspace},
|
||||||
{Keys.Oemtilde, CorsairKeyboardKeyId.GraveAccentAndTilde},
|
{Keys.Oemtilde, CorsairLedId.GraveAccentAndTilde},
|
||||||
{Keys.OemMinus, CorsairKeyboardKeyId.MinusAndUnderscore},
|
{Keys.OemMinus, CorsairLedId.MinusAndUnderscore},
|
||||||
{Keys.Oemplus, CorsairKeyboardKeyId.EqualsAndPlus},
|
{Keys.Oemplus, CorsairLedId.EqualsAndPlus},
|
||||||
{Keys.OemOpenBrackets, CorsairKeyboardKeyId.BracketLeft},
|
{Keys.OemOpenBrackets, CorsairLedId.BracketLeft},
|
||||||
{Keys.Oem6, CorsairKeyboardKeyId.BracketRight},
|
{Keys.Oem6, CorsairLedId.BracketRight},
|
||||||
{Keys.Return, CorsairKeyboardKeyId.Enter},
|
{Keys.Return, CorsairLedId.Enter},
|
||||||
{Keys.Next, CorsairKeyboardKeyId.PageDown},
|
{Keys.Next, CorsairLedId.PageDown},
|
||||||
{Keys.Capital, CorsairKeyboardKeyId.CapsLock},
|
{Keys.Capital, CorsairLedId.CapsLock},
|
||||||
{Keys.Oem1, CorsairKeyboardKeyId.SemicolonAndColon},
|
{Keys.Oem1, CorsairLedId.SemicolonAndColon},
|
||||||
{Keys.Oem7, CorsairKeyboardKeyId.ApostropheAndDoubleQuote},
|
{Keys.Oem7, CorsairLedId.ApostropheAndDoubleQuote},
|
||||||
{Keys.OemBackslash, CorsairKeyboardKeyId.Backslash},
|
{Keys.OemBackslash, CorsairLedId.Backslash},
|
||||||
{Keys.LShiftKey, CorsairKeyboardKeyId.LeftShift},
|
{Keys.LShiftKey, CorsairLedId.LeftShift},
|
||||||
{Keys.Oem5, CorsairKeyboardKeyId.NonUsBackslash},
|
{Keys.Oem5, CorsairLedId.NonUsBackslash},
|
||||||
{Keys.Oemcomma, CorsairKeyboardKeyId.CommaAndLessThan},
|
{Keys.Oemcomma, CorsairLedId.CommaAndLessThan},
|
||||||
{Keys.OemPeriod, CorsairKeyboardKeyId.PeriodAndBiggerThan},
|
{Keys.OemPeriod, CorsairLedId.PeriodAndBiggerThan},
|
||||||
{Keys.OemQuestion, CorsairKeyboardKeyId.SlashAndQuestionMark},
|
{Keys.OemQuestion, CorsairLedId.SlashAndQuestionMark},
|
||||||
{Keys.RShiftKey, CorsairKeyboardKeyId.RightShift},
|
{Keys.RShiftKey, CorsairLedId.RightShift},
|
||||||
{Keys.LControlKey, CorsairKeyboardKeyId.LeftCtrl},
|
{Keys.LControlKey, CorsairLedId.LeftCtrl},
|
||||||
{Keys.LWin, CorsairKeyboardKeyId.LeftGui},
|
{Keys.LWin, CorsairLedId.LeftGui},
|
||||||
{Keys.LMenu, CorsairKeyboardKeyId.LeftAlt},
|
{Keys.LMenu, CorsairLedId.LeftAlt},
|
||||||
{Keys.RMenu, CorsairKeyboardKeyId.RightAlt},
|
{Keys.RMenu, CorsairLedId.RightAlt},
|
||||||
{Keys.RWin, CorsairKeyboardKeyId.RightGui},
|
{Keys.RWin, CorsairLedId.RightGui},
|
||||||
{Keys.Apps, CorsairKeyboardKeyId.Application},
|
{Keys.Apps, CorsairLedId.Application},
|
||||||
{Keys.RControlKey, CorsairKeyboardKeyId.RightCtrl},
|
{Keys.RControlKey, CorsairLedId.RightCtrl},
|
||||||
{Keys.Left, CorsairKeyboardKeyId.LeftArrow},
|
{Keys.Left, CorsairLedId.LeftArrow},
|
||||||
{Keys.Down, CorsairKeyboardKeyId.DownArrow},
|
{Keys.Down, CorsairLedId.DownArrow},
|
||||||
{Keys.Right, CorsairKeyboardKeyId.RightArrow},
|
{Keys.Right, CorsairLedId.RightArrow},
|
||||||
{Keys.Up, CorsairKeyboardKeyId.UpArrow},
|
{Keys.Up, CorsairLedId.UpArrow},
|
||||||
{Keys.NumPad0, CorsairKeyboardKeyId.Keypad0},
|
{Keys.NumPad0, CorsairLedId.Keypad0},
|
||||||
{Keys.NumPad1, CorsairKeyboardKeyId.Keypad1},
|
{Keys.NumPad1, CorsairLedId.Keypad1},
|
||||||
{Keys.NumPad2, CorsairKeyboardKeyId.Keypad2},
|
{Keys.NumPad2, CorsairLedId.Keypad2},
|
||||||
{Keys.NumPad3, CorsairKeyboardKeyId.Keypad3},
|
{Keys.NumPad3, CorsairLedId.Keypad3},
|
||||||
{Keys.NumPad4, CorsairKeyboardKeyId.Keypad4},
|
{Keys.NumPad4, CorsairLedId.Keypad4},
|
||||||
{Keys.NumPad5, CorsairKeyboardKeyId.Keypad5},
|
{Keys.NumPad5, CorsairLedId.Keypad5},
|
||||||
{Keys.NumPad6, CorsairKeyboardKeyId.Keypad6},
|
{Keys.NumPad6, CorsairLedId.Keypad6},
|
||||||
{Keys.NumPad7, CorsairKeyboardKeyId.Keypad7},
|
{Keys.NumPad7, CorsairLedId.Keypad7},
|
||||||
{Keys.NumPad8, CorsairKeyboardKeyId.Keypad8},
|
{Keys.NumPad8, CorsairLedId.Keypad8},
|
||||||
{Keys.NumPad9, CorsairKeyboardKeyId.Keypad9},
|
{Keys.NumPad9, CorsairLedId.Keypad9},
|
||||||
{Keys.Divide, CorsairKeyboardKeyId.KeypadSlash},
|
{Keys.Divide, CorsairLedId.KeypadSlash},
|
||||||
{Keys.Multiply, CorsairKeyboardKeyId.KeypadAsterisk},
|
{Keys.Multiply, CorsairLedId.KeypadAsterisk},
|
||||||
{Keys.Subtract, CorsairKeyboardKeyId.KeypadMinus},
|
{Keys.Subtract, CorsairLedId.KeypadMinus},
|
||||||
{Keys.Add, CorsairKeyboardKeyId.KeypadPlus},
|
{Keys.Add, CorsairLedId.KeypadPlus},
|
||||||
{Keys.Decimal, CorsairKeyboardKeyId.KeypadPeriodAndDelete},
|
{Keys.Decimal, CorsairLedId.KeypadPeriodAndDelete},
|
||||||
{Keys.MediaStop, CorsairKeyboardKeyId.Stop},
|
{Keys.MediaStop, CorsairLedId.Stop},
|
||||||
{Keys.MediaPreviousTrack, CorsairKeyboardKeyId.ScanPreviousTrack},
|
{Keys.MediaPreviousTrack, CorsairLedId.ScanPreviousTrack},
|
||||||
{Keys.MediaNextTrack, CorsairKeyboardKeyId.ScanNextTrack},
|
{Keys.MediaNextTrack, CorsairLedId.ScanNextTrack},
|
||||||
{Keys.MediaPlayPause, CorsairKeyboardKeyId.PlayPause},
|
{Keys.MediaPlayPause, CorsairLedId.PlayPause},
|
||||||
{Keys.VolumeMute, CorsairKeyboardKeyId.Mute},
|
{Keys.VolumeMute, CorsairLedId.Mute},
|
||||||
{Keys.VolumeUp, CorsairKeyboardKeyId.VolumeUp},
|
{Keys.VolumeUp, CorsairLedId.VolumeUp},
|
||||||
{Keys.VolumeDown, CorsairKeyboardKeyId.VolumeDown}
|
{Keys.VolumeDown, CorsairLedId.VolumeDown}
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
||||||
public static Dictionary<Keys, CorsairKeyboardKeyId> FormsKeys { get; set; }
|
public static Dictionary<Keys, CorsairLedId> FormsKeys { get; set; }
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
Binary file not shown.
Loading…
x
Reference in New Issue
Block a user