Skip to content

Commit

Permalink
added custom keyboard json support
Browse files Browse the repository at this point in the history
  • Loading branch information
Aytackydln committed Jan 17, 2023
1 parent 2ae3fe4 commit 2cf5dc7
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 0 deletions.
3 changes: 3 additions & 0 deletions Project-Aurora/Project-Aurora/Settings/Configuration.cs
Original file line number Diff line number Diff line change
Expand Up @@ -166,6 +166,9 @@ public enum PreferredKeyboard
[Description("Additional Lights (Debug)")]
Debug = 3,

[Description("Custom Json")]
Custom = 4,

/*
[Description("Logitech")]
Logitech = 1,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,15 +8,21 @@
using System.Threading;
using System.Windows;
using System.Windows.Controls;
using System.Windows.Forms;
using System.Windows.Media;
using System.Windows.Media.Imaging;
using Aurora.Devices;
using Aurora.Settings.Keycaps;
using Aurora.Utils;
using Newtonsoft.Json;
using Newtonsoft.Json.Serialization;
using Application = System.Windows.Application;
using Color = System.Drawing.Color;
using HorizontalAlignment = System.Windows.HorizontalAlignment;
using Image = System.Windows.Controls.Image;
using Label = System.Windows.Controls.Label;
using MessageBox = System.Windows.MessageBox;
using UserControl = System.Windows.Controls.UserControl;

namespace Aurora.Settings;

Expand Down Expand Up @@ -591,6 +597,7 @@ private void LoadKeyboard(string layoutConfigPath)
{
if (!File.Exists(layoutConfigPath))
{
MessageBox.Show( layoutConfigPath + " could not be found", "Layout not found", MessageBoxButton.OK);
return;
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,7 @@ public static class PeripheralLayoutMap
{PreferredKeyboard.GenericLaptop, "generic_laptop.json"},
{PreferredKeyboard.GenericLaptopNumpad, "generic_laptop_numpad.json"},
{PreferredKeyboard.Debug, "additional_lights.json"},
{PreferredKeyboard.Custom, "custom_keyboard.json"},
{PreferredKeyboard.Drevo_BladeMaster, "drevo_blademaster.json"},
{PreferredKeyboard.Wooting_Two, "wooting_two.json"},
{PreferredKeyboard.MSI_GP66_US, "msi_gp66_us.json"},
Expand Down

0 comments on commit 2cf5dc7

Please sign in to comment.