Skip to content

Commit 2cf5dc7

Browse files
committed
added custom keyboard json support
1 parent 2ae3fe4 commit 2cf5dc7

3 files changed

Lines changed: 11 additions & 0 deletions

File tree

Project-Aurora/Project-Aurora/Settings/Configuration.cs

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -166,6 +166,9 @@ public enum PreferredKeyboard
166166
[Description("Additional Lights (Debug)")]
167167
Debug = 3,
168168

169+
[Description("Custom Json")]
170+
Custom = 4,
171+
169172
/*
170173
[Description("Logitech")]
171174
Logitech = 1,

Project-Aurora/Project-Aurora/Settings/KeyboardLayoutManager.cs

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,15 +8,21 @@
88
using System.Threading;
99
using System.Windows;
1010
using System.Windows.Controls;
11+
using System.Windows.Forms;
1112
using System.Windows.Media;
1213
using System.Windows.Media.Imaging;
1314
using Aurora.Devices;
1415
using Aurora.Settings.Keycaps;
1516
using Aurora.Utils;
1617
using Newtonsoft.Json;
1718
using Newtonsoft.Json.Serialization;
19+
using Application = System.Windows.Application;
1820
using Color = System.Drawing.Color;
21+
using HorizontalAlignment = System.Windows.HorizontalAlignment;
1922
using Image = System.Windows.Controls.Image;
23+
using Label = System.Windows.Controls.Label;
24+
using MessageBox = System.Windows.MessageBox;
25+
using UserControl = System.Windows.Controls.UserControl;
2026

2127
namespace Aurora.Settings;
2228

@@ -591,6 +597,7 @@ private void LoadKeyboard(string layoutConfigPath)
591597
{
592598
if (!File.Exists(layoutConfigPath))
593599
{
600+
MessageBox.Show( layoutConfigPath + " could not be found", "Layout not found", MessageBoxButton.OK);
594601
return;
595602
}
596603

Project-Aurora/Project-Aurora/Settings/PeripheralLayoutMap.cs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -46,6 +46,7 @@ public static class PeripheralLayoutMap
4646
{PreferredKeyboard.GenericLaptop, "generic_laptop.json"},
4747
{PreferredKeyboard.GenericLaptopNumpad, "generic_laptop_numpad.json"},
4848
{PreferredKeyboard.Debug, "additional_lights.json"},
49+
{PreferredKeyboard.Custom, "custom_keyboard.json"},
4950
{PreferredKeyboard.Drevo_BladeMaster, "drevo_blademaster.json"},
5051
{PreferredKeyboard.Wooting_Two, "wooting_two.json"},
5152
{PreferredKeyboard.MSI_GP66_US, "msi_gp66_us.json"},

0 commit comments

Comments
 (0)