diff --git a/Artemis/Artemis/DeviceProviders/Logitech/G810.cs b/Artemis/Artemis/DeviceProviders/Logitech/G810.cs index 04163d171..b9c6a8272 100644 --- a/Artemis/Artemis/DeviceProviders/Logitech/G810.cs +++ b/Artemis/Artemis/DeviceProviders/Logitech/G810.cs @@ -23,7 +23,7 @@ namespace Artemis.DeviceProviders.Logitech public override KeyMatch? GetKeyPosition(Keys keyCode) { - return KeyMap.UsEnglishOrionKeys.FirstOrDefault(k => k.KeyCode == keyCode); + return KeyMap.QwertyLayout.FirstOrDefault(k => k.KeyCode == keyCode); } } } \ No newline at end of file diff --git a/Artemis/Artemis/DeviceProviders/Logitech/G910.cs b/Artemis/Artemis/DeviceProviders/Logitech/G910.cs index ac481e9a0..97bfda191 100644 --- a/Artemis/Artemis/DeviceProviders/Logitech/G910.cs +++ b/Artemis/Artemis/DeviceProviders/Logitech/G910.cs @@ -23,7 +23,7 @@ namespace Artemis.DeviceProviders.Logitech public override KeyMatch? GetKeyPosition(Keys keyCode) { - return KeyMap.UsEnglishOrionKeys.FirstOrDefault(k => k.KeyCode == keyCode); + return KeyMap.QwertyLayout.FirstOrDefault(k => k.KeyCode == keyCode); } } } \ No newline at end of file diff --git a/Artemis/Artemis/DeviceProviders/Logitech/LogitechKeyboard.cs b/Artemis/Artemis/DeviceProviders/Logitech/LogitechKeyboard.cs index 39f4b0ad8..e04471a29 100644 --- a/Artemis/Artemis/DeviceProviders/Logitech/LogitechKeyboard.cs +++ b/Artemis/Artemis/DeviceProviders/Logitech/LogitechKeyboard.cs @@ -16,7 +16,7 @@ namespace Artemis.DeviceProviders.Logitech @"SOFTWARE\Classes\Installer\Dependencies\{ca67548a-5ebe-413a-b50c-4b9ceb6d66c6}") == null) { CantEnableText = "Couldn't connect to your Logitech keyboard.\n" + - "The Visual C 2012 Redistributable could not be found, which is required.\n" + + "The Visual C++ 2012 Redistributable could not be found, which is required.\n" + "Please download it by going to the following URL:\n\n" + "https://www.microsoft.com/download/confirmation.aspx?id=30679"; diff --git a/Artemis/Artemis/DeviceProviders/Logitech/Utilities/KeyMap.cs b/Artemis/Artemis/DeviceProviders/Logitech/Utilities/KeyMap.cs index 6a8506a83..1c4264e0e 100644 --- a/Artemis/Artemis/DeviceProviders/Logitech/Utilities/KeyMap.cs +++ b/Artemis/Artemis/DeviceProviders/Logitech/Utilities/KeyMap.cs @@ -8,26 +8,25 @@ namespace Artemis.DeviceProviders.Logitech.Utilities static KeyMap() { // There are several keyboard layouts - // TODO: Implemented more layouts and an option to select them - UsEnglishOrionKeys = new List + QwertyLayout = new List { // Row 1 new KeyMatch(Keys.Escape, 0, 0), - new KeyMatch(Keys.F1, 1, 0), - new KeyMatch(Keys.F2, 2, 0), - new KeyMatch(Keys.F3, 3, 0), - new KeyMatch(Keys.F4, 4, 0), - new KeyMatch(Keys.F5, 5, 0), - new KeyMatch(Keys.F6, 6, 0), - new KeyMatch(Keys.F7, 7, 0), - new KeyMatch(Keys.F8, 8, 0), - new KeyMatch(Keys.F9, 9, 0), - new KeyMatch(Keys.F10, 10, 0), - new KeyMatch(Keys.F11, 11, 0), - new KeyMatch(Keys.F12, 12, 0), - new KeyMatch(Keys.PrintScreen, 13, 0), - new KeyMatch(Keys.Scroll, 14, 0), - new KeyMatch(Keys.Pause, 15, 0), + new KeyMatch(Keys.F1, 2, 0), + new KeyMatch(Keys.F2, 3, 0), + new KeyMatch(Keys.F3, 4, 0), + new KeyMatch(Keys.F4, 5, 0), + new KeyMatch(Keys.F5, 6, 0), + new KeyMatch(Keys.F6, 7, 0), + new KeyMatch(Keys.F7, 8, 0), + new KeyMatch(Keys.F8, 9, 0), + new KeyMatch(Keys.F9, 11, 0), + new KeyMatch(Keys.F10, 12, 0), + new KeyMatch(Keys.F11, 13, 0), + new KeyMatch(Keys.F12, 14, 0), + new KeyMatch(Keys.PrintScreen, 15, 0), + new KeyMatch(Keys.Scroll, 16, 0), + new KeyMatch(Keys.Pause, 17, 0), // Row 2 new KeyMatch(Keys.Oemtilde, 0, 1), @@ -57,15 +56,15 @@ namespace Artemis.DeviceProviders.Logitech.Utilities new KeyMatch(Keys.Q, 1, 2), new KeyMatch(Keys.W, 2, 2), new KeyMatch(Keys.E, 3, 2), - new KeyMatch(Keys.R, 4, 2), - new KeyMatch(Keys.T, 5, 2), - new KeyMatch(Keys.Y, 6, 2), - new KeyMatch(Keys.U, 7, 2), - new KeyMatch(Keys.I, 8, 2), - new KeyMatch(Keys.O, 9, 2), - new KeyMatch(Keys.P, 10, 2), - new KeyMatch(Keys.OemOpenBrackets, 11, 2), - new KeyMatch(Keys.Oem6, 12, 2), + new KeyMatch(Keys.R, 5, 2), + new KeyMatch(Keys.T, 6, 2), + new KeyMatch(Keys.Y, 7, 2), + new KeyMatch(Keys.U, 8, 2), + new KeyMatch(Keys.I, 9, 2), + new KeyMatch(Keys.O, 10, 2), + new KeyMatch(Keys.P, 11, 2), + new KeyMatch(Keys.OemOpenBrackets, 12, 2), + new KeyMatch(Keys.Oem6, 13, 2), new KeyMatch(Keys.Delete, 14, 2), new KeyMatch(Keys.End, 15, 2), new KeyMatch(Keys.Next, 16, 2), @@ -77,18 +76,18 @@ namespace Artemis.DeviceProviders.Logitech.Utilities // Row 4 new KeyMatch(Keys.Capital, 0, 3), new KeyMatch(Keys.A, 1, 3), - new KeyMatch(Keys.S, 2, 3), - new KeyMatch(Keys.D, 3, 3), - new KeyMatch(Keys.F, 4, 3), - new KeyMatch(Keys.G, 5, 3), - new KeyMatch(Keys.H, 6, 3), - new KeyMatch(Keys.J, 7, 3), - new KeyMatch(Keys.K, 8, 3), - new KeyMatch(Keys.L, 9, 3), - new KeyMatch(Keys.Oem1, 10, 3), - new KeyMatch(Keys.Oem7, 11, 3), - new KeyMatch(Keys.Oem5, 12, 3), - new KeyMatch(Keys.Return, 13, 3), + new KeyMatch(Keys.S, 3, 3), + new KeyMatch(Keys.D, 4, 3), + new KeyMatch(Keys.F, 5, 3), + new KeyMatch(Keys.G, 6, 3), + new KeyMatch(Keys.H, 7, 3), + new KeyMatch(Keys.J, 8, 3), + new KeyMatch(Keys.K, 9, 3), + new KeyMatch(Keys.L, 10, 3), + new KeyMatch(Keys.Oem1, 11, 3), + new KeyMatch(Keys.Oem7, 12, 3), + new KeyMatch(Keys.Oem5, 13, 3), + new KeyMatch(Keys.Return, 14, 3), new KeyMatch(Keys.NumPad4, 17, 3), new KeyMatch(Keys.NumPad5, 18, 3), new KeyMatch(Keys.NumPad6, 19, 3), @@ -117,8 +116,129 @@ namespace Artemis.DeviceProviders.Logitech.Utilities // Row 6 new KeyMatch(Keys.LControlKey, 0, 5), new KeyMatch(Keys.LWin, 1, 5), - new KeyMatch(Keys.LMenu, 2, 5), - new KeyMatch(Keys.Space, 5, 5), + new KeyMatch(Keys.LMenu, 3, 5), + new KeyMatch(Keys.Space, 6, 5), + new KeyMatch(Keys.RMenu, 11, 5), + new KeyMatch(Keys.RWin, 12, 5), + new KeyMatch(Keys.Apps, 13, 5), + new KeyMatch(Keys.RControlKey, 14, 5), + new KeyMatch(Keys.Left, 15, 5), + new KeyMatch(Keys.Down, 16, 5), + new KeyMatch(Keys.Right, 17, 5), + new KeyMatch(Keys.NumPad0, 18, 5), + new KeyMatch(Keys.Decimal, 19, 5) + }; + + AzertyLayout = new List + { + // Row 1 + new KeyMatch(Keys.Escape, 0, 0), + new KeyMatch(Keys.F1, 2, 0), + new KeyMatch(Keys.F2, 3, 0), + new KeyMatch(Keys.F3, 4, 0), + new KeyMatch(Keys.F4, 5, 0), + new KeyMatch(Keys.F5, 6, 0), + new KeyMatch(Keys.F6, 7, 0), + new KeyMatch(Keys.F7, 8, 0), + new KeyMatch(Keys.F8, 9, 0), + new KeyMatch(Keys.F9, 11, 0), + new KeyMatch(Keys.F10, 12, 0), + new KeyMatch(Keys.F11, 13, 0), + new KeyMatch(Keys.F12, 14, 0), + new KeyMatch(Keys.PrintScreen, 15, 0), + new KeyMatch(Keys.Scroll, 16, 0), + new KeyMatch(Keys.Pause, 17, 0), + + // Row 2 + new KeyMatch(Keys.Oemtilde, 0, 1), + new KeyMatch(Keys.D1, 1, 1), + new KeyMatch(Keys.D2, 2, 1), + new KeyMatch(Keys.D3, 3, 1), + new KeyMatch(Keys.D4, 4, 1), + new KeyMatch(Keys.D5, 5, 1), + new KeyMatch(Keys.D6, 6, 1), + new KeyMatch(Keys.D7, 7, 1), + new KeyMatch(Keys.D8, 8, 1), + new KeyMatch(Keys.D9, 9, 1), + new KeyMatch(Keys.D0, 10, 1), + new KeyMatch(Keys.OemMinus, 11, 1), + new KeyMatch(Keys.Oemplus, 12, 1), + new KeyMatch(Keys.Back, 13, 1), + new KeyMatch(Keys.Insert, 14, 1), + new KeyMatch(Keys.Home, 15, 1), + new KeyMatch(Keys.PageUp, 16, 1), + new KeyMatch(Keys.NumLock, 17, 1), + new KeyMatch(Keys.Divide, 18, 1), + new KeyMatch(Keys.Multiply, 19, 1), + new KeyMatch(Keys.Subtract, 20, 1), + + // Row 3 + new KeyMatch(Keys.Tab, 0, 2), + new KeyMatch(Keys.A, 1, 2), + new KeyMatch(Keys.Z, 2, 2), + new KeyMatch(Keys.E, 3, 2), + new KeyMatch(Keys.R, 5, 2), + new KeyMatch(Keys.T, 6, 2), + new KeyMatch(Keys.Y, 7, 2), + new KeyMatch(Keys.U, 8, 2), + new KeyMatch(Keys.I, 9, 2), + new KeyMatch(Keys.O, 10, 2), + new KeyMatch(Keys.P, 11, 2), + new KeyMatch(Keys.OemQuotes, 12, 2), + new KeyMatch(Keys.Oem6, 13, 2), + new KeyMatch(Keys.Delete, 14, 2), + new KeyMatch(Keys.End, 15, 2), + new KeyMatch(Keys.Next, 16, 2), + new KeyMatch(Keys.NumPad7, 17, 2), + new KeyMatch(Keys.NumPad8, 18, 2), + new KeyMatch(Keys.NumPad9, 19, 2), + new KeyMatch(Keys.Add, 20, 2), + + // Row 4 + new KeyMatch(Keys.Capital, 0, 3), + new KeyMatch(Keys.Q, 1, 3), + new KeyMatch(Keys.S, 3, 3), + new KeyMatch(Keys.D, 4, 3), + new KeyMatch(Keys.F, 5, 3), + new KeyMatch(Keys.G, 6, 3), + new KeyMatch(Keys.H, 7, 3), + new KeyMatch(Keys.J, 8, 3), + new KeyMatch(Keys.K, 9, 3), + new KeyMatch(Keys.L, 10, 3), + new KeyMatch(Keys.M, 11, 3), + new KeyMatch(Keys.Oem7, 12, 3), + new KeyMatch(Keys.Oem5, 13, 3), + new KeyMatch(Keys.Return, 14, 3), + new KeyMatch(Keys.NumPad4, 17, 3), + new KeyMatch(Keys.NumPad5, 18, 3), + new KeyMatch(Keys.NumPad6, 19, 3), + + // Row 5 + new KeyMatch(Keys.LShiftKey, 1, 4), + new KeyMatch(Keys.OemBackslash, 2, 4), + new KeyMatch(Keys.W, 2, 4), + new KeyMatch(Keys.X, 3, 4), + new KeyMatch(Keys.C, 4, 4), + new KeyMatch(Keys.V, 5, 4), + new KeyMatch(Keys.B, 6, 4), + new KeyMatch(Keys.N, 7, 4), + new KeyMatch(Keys.OemQuestion, 8, 4), + new KeyMatch(Keys.Oemcomma, 9, 4), + new KeyMatch(Keys.OemPeriod, 10, 4), + new KeyMatch(Keys.OemQuestion, 11, 4), + new KeyMatch(Keys.RShiftKey, 13, 4), + new KeyMatch(Keys.Up, 15, 4), + new KeyMatch(Keys.NumPad1, 17, 4), + new KeyMatch(Keys.NumPad2, 18, 4), + new KeyMatch(Keys.NumPad3, 19, 4), + // Both returns return "Return" (Yes...) + // new OrionKey(System.Windows.Forms.Keys.Return, 20, 4), + + // Row 6 + new KeyMatch(Keys.LControlKey, 0, 5), + new KeyMatch(Keys.LWin, 1, 5), + new KeyMatch(Keys.LMenu, 3, 5), + new KeyMatch(Keys.Space, 6, 5), new KeyMatch(Keys.RMenu, 11, 5), new KeyMatch(Keys.RWin, 12, 5), new KeyMatch(Keys.Apps, 13, 5), @@ -130,7 +250,8 @@ namespace Artemis.DeviceProviders.Logitech.Utilities new KeyMatch(Keys.Decimal, 19, 5) }; } - - public static List UsEnglishOrionKeys { get; set; } + + public static List QwertyLayout { get; set; } + public static List AzertyLayout { get; set; } } } \ No newline at end of file diff --git a/Artemis/Artemis/DeviceProviders/Razer/BlackWidow.cs b/Artemis/Artemis/DeviceProviders/Razer/BlackWidow.cs index 5aa6e9c1e..bb934550e 100644 --- a/Artemis/Artemis/DeviceProviders/Razer/BlackWidow.cs +++ b/Artemis/Artemis/DeviceProviders/Razer/BlackWidow.cs @@ -56,7 +56,7 @@ namespace Artemis.DeviceProviders.Razer public override KeyMatch? GetKeyPosition(Keys keyCode) { // TODO: Needs it's own keymap or a way to get it from the Chroma SDK - return KeyMap.UsEnglishOrionKeys.FirstOrDefault(k => k.KeyCode == keyCode); + return KeyMap.QwertyLayout.FirstOrDefault(k => k.KeyCode == keyCode); } } } \ No newline at end of file diff --git a/Artemis/Artemis/Views/Flyouts/FlyoutSettingsView.xaml b/Artemis/Artemis/Views/Flyouts/FlyoutSettingsView.xaml index 34b66d7a6..3db824477 100644 --- a/Artemis/Artemis/Views/Flyouts/FlyoutSettingsView.xaml +++ b/Artemis/Artemis/Views/Flyouts/FlyoutSettingsView.xaml @@ -25,6 +25,7 @@ + @@ -63,47 +64,54 @@ HorizontalAlignment="Right" Width="140" /> - +