mirror of
https://github.com/DarthAffe/RGB.NET.git
synced 2026-11-11 13:06:24 +00:00
Made logitech keyboards work (Layout and Images for G910 DE-Layout)
This commit is contained in:
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;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user