Made logitech keyboards work (Layout and Images for G910 DE-Layout)

This commit is contained in:
DarthAffe committed 2017-03-26 20:23:41 +02:00
1 parent 9617771368
commit 726ec1443e
125 files changed
+829 -18

No files matched your search

@@ -1,7 +1,6 @@
// ReSharper disable MemberCanBePrivate.Global
// ReSharper disable UnusedMember.Global
using System;
using System.IO;
using System.Reflection;
@@ -40,8 +39,10 @@ namespace RGB.NET.Devices.Logitech
/// <inheritdoc />
protected override void InitializeLayout()
{
ApplyLayoutFromFile(Path.Combine(Path.GetDirectoryName(Assembly.GetEntryAssembly().Location),
$@"Layouts\Logitech\Keyboards\{KeyboardDeviceInfo.Model.Replace(" ", string.Empty).ToUpper()}\{KeyboardDeviceInfo.PhysicalLayout.ToString().ToUpper()}.xml"));
string model = KeyboardDeviceInfo.Model.Replace(" ", string.Empty).ToUpper();
ApplyLayoutFromFile(PathHelper.GetAbsolutePath(
$@"Layouts\Logitech\Keyboards\{model}\{KeyboardDeviceInfo.PhysicalLayout.ToString().ToUpper()}.xml"),
KeyboardDeviceInfo.LogicalLayout.ToString(), PathHelper.GetAbsolutePath($@"Images\Logitech\Keyboards"));
}
#endregion
@@ -43,7 +43,7 @@ namespace RGB.NET.Devices.Logitech
SetLayouts(culture.KeyboardLayoutId);
Image = new Uri(Path.Combine(Path.GetDirectoryName(Assembly.GetEntryAssembly().Location),
$@"Images\Logitech\Keyboards\{Model.Replace(" ", string.Empty).ToUpper()}\{LogicalLayout.ToString().ToUpper()}.png"), UriKind.Absolute);
$@"Images\Logitech\Keyboards\{Model.Replace(" ", string.Empty).ToUpper()}.png"), UriKind.Absolute);
}
private void SetLayouts(int keyboardLayoutId)
@@ -52,8 +52,8 @@ namespace RGB.NET.Devices.Logitech
{
//TODO DarthAffe 04.02.2017: Check all available keyboards and there layout-ids
default:
PhysicalLayout = LogitechPhysicalKeyboardLayout.US;
LogicalLayout = LogitechLogicalKeyboardLayout.NA;
PhysicalLayout = LogitechPhysicalKeyboardLayout.UK;
LogicalLayout = LogitechLogicalKeyboardLayout.DE;
break;
}
}