1
0
mirror of https://github.com/Artemis-RGB/Artemis synced 2025-12-13 05:48:35 +00:00

Adjusted G910 qerty keymap, added azerty keymap

This commit is contained in:
SpoinkyNL 2016-09-28 21:27:24 +02:00
parent 683228de81
commit 4879e51ef8
6 changed files with 187 additions and 58 deletions

View File

@ -23,7 +23,7 @@ namespace Artemis.DeviceProviders.Logitech
public override KeyMatch? GetKeyPosition(Keys keyCode) public override KeyMatch? GetKeyPosition(Keys keyCode)
{ {
return KeyMap.UsEnglishOrionKeys.FirstOrDefault(k => k.KeyCode == keyCode); return KeyMap.QwertyLayout.FirstOrDefault(k => k.KeyCode == keyCode);
} }
} }
} }

View File

@ -23,7 +23,7 @@ namespace Artemis.DeviceProviders.Logitech
public override KeyMatch? GetKeyPosition(Keys keyCode) public override KeyMatch? GetKeyPosition(Keys keyCode)
{ {
return KeyMap.UsEnglishOrionKeys.FirstOrDefault(k => k.KeyCode == keyCode); return KeyMap.QwertyLayout.FirstOrDefault(k => k.KeyCode == keyCode);
} }
} }
} }

View File

@ -16,7 +16,7 @@ namespace Artemis.DeviceProviders.Logitech
@"SOFTWARE\Classes\Installer\Dependencies\{ca67548a-5ebe-413a-b50c-4b9ceb6d66c6}") == null) @"SOFTWARE\Classes\Installer\Dependencies\{ca67548a-5ebe-413a-b50c-4b9ceb6d66c6}") == null)
{ {
CantEnableText = "Couldn't connect to your Logitech keyboard.\n" + 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" + "Please download it by going to the following URL:\n\n" +
"https://www.microsoft.com/download/confirmation.aspx?id=30679"; "https://www.microsoft.com/download/confirmation.aspx?id=30679";

View File

@ -8,26 +8,25 @@ namespace Artemis.DeviceProviders.Logitech.Utilities
static KeyMap() static KeyMap()
{ {
// There are several keyboard layouts // There are several keyboard layouts
// TODO: Implemented more layouts and an option to select them QwertyLayout = new List<KeyMatch>
UsEnglishOrionKeys = new List<KeyMatch>
{ {
// Row 1 // Row 1
new KeyMatch(Keys.Escape, 0, 0), new KeyMatch(Keys.Escape, 0, 0),
new KeyMatch(Keys.F1, 1, 0), new KeyMatch(Keys.F1, 2, 0),
new KeyMatch(Keys.F2, 2, 0), new KeyMatch(Keys.F2, 3, 0),
new KeyMatch(Keys.F3, 3, 0), new KeyMatch(Keys.F3, 4, 0),
new KeyMatch(Keys.F4, 4, 0), new KeyMatch(Keys.F4, 5, 0),
new KeyMatch(Keys.F5, 5, 0), new KeyMatch(Keys.F5, 6, 0),
new KeyMatch(Keys.F6, 6, 0), new KeyMatch(Keys.F6, 7, 0),
new KeyMatch(Keys.F7, 7, 0), new KeyMatch(Keys.F7, 8, 0),
new KeyMatch(Keys.F8, 8, 0), new KeyMatch(Keys.F8, 9, 0),
new KeyMatch(Keys.F9, 9, 0), new KeyMatch(Keys.F9, 11, 0),
new KeyMatch(Keys.F10, 10, 0), new KeyMatch(Keys.F10, 12, 0),
new KeyMatch(Keys.F11, 11, 0), new KeyMatch(Keys.F11, 13, 0),
new KeyMatch(Keys.F12, 12, 0), new KeyMatch(Keys.F12, 14, 0),
new KeyMatch(Keys.PrintScreen, 13, 0), new KeyMatch(Keys.PrintScreen, 15, 0),
new KeyMatch(Keys.Scroll, 14, 0), new KeyMatch(Keys.Scroll, 16, 0),
new KeyMatch(Keys.Pause, 15, 0), new KeyMatch(Keys.Pause, 17, 0),
// Row 2 // Row 2
new KeyMatch(Keys.Oemtilde, 0, 1), new KeyMatch(Keys.Oemtilde, 0, 1),
@ -57,15 +56,15 @@ namespace Artemis.DeviceProviders.Logitech.Utilities
new KeyMatch(Keys.Q, 1, 2), new KeyMatch(Keys.Q, 1, 2),
new KeyMatch(Keys.W, 2, 2), new KeyMatch(Keys.W, 2, 2),
new KeyMatch(Keys.E, 3, 2), new KeyMatch(Keys.E, 3, 2),
new KeyMatch(Keys.R, 4, 2), new KeyMatch(Keys.R, 5, 2),
new KeyMatch(Keys.T, 5, 2), new KeyMatch(Keys.T, 6, 2),
new KeyMatch(Keys.Y, 6, 2), new KeyMatch(Keys.Y, 7, 2),
new KeyMatch(Keys.U, 7, 2), new KeyMatch(Keys.U, 8, 2),
new KeyMatch(Keys.I, 8, 2), new KeyMatch(Keys.I, 9, 2),
new KeyMatch(Keys.O, 9, 2), new KeyMatch(Keys.O, 10, 2),
new KeyMatch(Keys.P, 10, 2), new KeyMatch(Keys.P, 11, 2),
new KeyMatch(Keys.OemOpenBrackets, 11, 2), new KeyMatch(Keys.OemOpenBrackets, 12, 2),
new KeyMatch(Keys.Oem6, 12, 2), new KeyMatch(Keys.Oem6, 13, 2),
new KeyMatch(Keys.Delete, 14, 2), new KeyMatch(Keys.Delete, 14, 2),
new KeyMatch(Keys.End, 15, 2), new KeyMatch(Keys.End, 15, 2),
new KeyMatch(Keys.Next, 16, 2), new KeyMatch(Keys.Next, 16, 2),
@ -77,18 +76,18 @@ namespace Artemis.DeviceProviders.Logitech.Utilities
// Row 4 // Row 4
new KeyMatch(Keys.Capital, 0, 3), new KeyMatch(Keys.Capital, 0, 3),
new KeyMatch(Keys.A, 1, 3), new KeyMatch(Keys.A, 1, 3),
new KeyMatch(Keys.S, 2, 3), new KeyMatch(Keys.S, 3, 3),
new KeyMatch(Keys.D, 3, 3), new KeyMatch(Keys.D, 4, 3),
new KeyMatch(Keys.F, 4, 3), new KeyMatch(Keys.F, 5, 3),
new KeyMatch(Keys.G, 5, 3), new KeyMatch(Keys.G, 6, 3),
new KeyMatch(Keys.H, 6, 3), new KeyMatch(Keys.H, 7, 3),
new KeyMatch(Keys.J, 7, 3), new KeyMatch(Keys.J, 8, 3),
new KeyMatch(Keys.K, 8, 3), new KeyMatch(Keys.K, 9, 3),
new KeyMatch(Keys.L, 9, 3), new KeyMatch(Keys.L, 10, 3),
new KeyMatch(Keys.Oem1, 10, 3), new KeyMatch(Keys.Oem1, 11, 3),
new KeyMatch(Keys.Oem7, 11, 3), new KeyMatch(Keys.Oem7, 12, 3),
new KeyMatch(Keys.Oem5, 12, 3), new KeyMatch(Keys.Oem5, 13, 3),
new KeyMatch(Keys.Return, 13, 3), new KeyMatch(Keys.Return, 14, 3),
new KeyMatch(Keys.NumPad4, 17, 3), new KeyMatch(Keys.NumPad4, 17, 3),
new KeyMatch(Keys.NumPad5, 18, 3), new KeyMatch(Keys.NumPad5, 18, 3),
new KeyMatch(Keys.NumPad6, 19, 3), new KeyMatch(Keys.NumPad6, 19, 3),
@ -117,8 +116,129 @@ namespace Artemis.DeviceProviders.Logitech.Utilities
// Row 6 // Row 6
new KeyMatch(Keys.LControlKey, 0, 5), new KeyMatch(Keys.LControlKey, 0, 5),
new KeyMatch(Keys.LWin, 1, 5), new KeyMatch(Keys.LWin, 1, 5),
new KeyMatch(Keys.LMenu, 2, 5), new KeyMatch(Keys.LMenu, 3, 5),
new KeyMatch(Keys.Space, 5, 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<KeyMatch>
{
// 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.RMenu, 11, 5),
new KeyMatch(Keys.RWin, 12, 5), new KeyMatch(Keys.RWin, 12, 5),
new KeyMatch(Keys.Apps, 13, 5), new KeyMatch(Keys.Apps, 13, 5),
@ -130,7 +250,8 @@ namespace Artemis.DeviceProviders.Logitech.Utilities
new KeyMatch(Keys.Decimal, 19, 5) new KeyMatch(Keys.Decimal, 19, 5)
}; };
} }
public static List<KeyMatch> UsEnglishOrionKeys { get; set; } public static List<KeyMatch> QwertyLayout { get; set; }
public static List<KeyMatch> AzertyLayout { get; set; }
} }
} }

View File

@ -56,7 +56,7 @@ namespace Artemis.DeviceProviders.Razer
public override KeyMatch? GetKeyPosition(Keys keyCode) public override KeyMatch? GetKeyPosition(Keys keyCode)
{ {
// TODO: Needs it's own keymap or a way to get it from the Chroma SDK // 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);
} }
} }
} }

View File

@ -25,6 +25,7 @@
<RowDefinition Height="Auto" /> <RowDefinition Height="Auto" />
<RowDefinition Height="Auto" /> <RowDefinition Height="Auto" />
<RowDefinition Height="Auto" /> <RowDefinition Height="Auto" />
<RowDefinition Height="Auto" />
<RowDefinition Height="*" /> <RowDefinition Height="*" />
</Grid.RowDefinitions> </Grid.RowDefinitions>
@ -63,47 +64,54 @@
HorizontalAlignment="Right" HorizontalAlignment="Right"
Width="140" /> Width="140" />
<!-- Gamestate port --> <!-- Layout selection -->
<Label Grid.Row="5" Grid.Column="0" Margin="5" VerticalAlignment="Center" HorizontalAlignment="Left" <Label Grid.Row="5" Grid.Column="0" Margin="5" VerticalAlignment="Center" HorizontalAlignment="Left"
Content="Layout:" />
<ComboBox Grid.Row="5" Grid.Column="1" x:Name="KeyboardLayouts" Margin="10" VerticalAlignment="Center"
HorizontalAlignment="Right"
Width="140" />
<!-- Gamestate port -->
<Label Grid.Row="6" Grid.Column="0" Margin="5" VerticalAlignment="Center" HorizontalAlignment="Left"
Content="Gamestate server port:" /> Content="Gamestate server port:" />
<controls:NumericUpDown Grid.Row="5" Grid.Column="1" Margin="10" VerticalAlignment="Center" <controls:NumericUpDown Grid.Row="6" Grid.Column="1" Margin="10" VerticalAlignment="Center"
HorizontalAlignment="Right" Width="120" HorizontalAlignment="Right" Width="120"
Value="{Binding Path=GeneralSettings.GamestatePort, Mode=TwoWay}" /> Value="{Binding Path=GeneralSettings.GamestatePort, Mode=TwoWay}" />
<!-- Updates check --> <!-- Updates check -->
<Label Grid.Row="6" Grid.Column="0" Margin="5" VerticalAlignment="Center" HorizontalAlignment="Left" <Label Grid.Row="7" Grid.Column="0" Margin="5" VerticalAlignment="Center" HorizontalAlignment="Left"
Content="Auto-update:" /> Content="Auto-update:" />
<controls:ToggleSwitch Grid.Row="6" Grid.Column="1" Margin="5" OnLabel="Yes" OffLabel="No" <controls:ToggleSwitch Grid.Row="7" Grid.Column="1" Margin="5" OnLabel="Yes" OffLabel="No"
VerticalAlignment="Center" HorizontalAlignment="Right" Width="125" VerticalAlignment="Center" HorizontalAlignment="Right" Width="125"
IsChecked="{Binding Path=GeneralSettings.AutoUpdate, Mode=TwoWay}" /> IsChecked="{Binding Path=GeneralSettings.AutoUpdate, Mode=TwoWay}" />
<!-- Update pointers --> <!-- Update pointers -->
<Label Grid.Row="7" Grid.Column="0" Margin="5" VerticalAlignment="Center" HorizontalAlignment="Left" <Label Grid.Row="8" Grid.Column="0" Margin="5" VerticalAlignment="Center" HorizontalAlignment="Left"
Content="Download pointers:" /> Content="Download pointers:" />
<controls:ToggleSwitch Grid.Row="7" Grid.Column="1" Margin="5" OnLabel="Yes" OffLabel="No" <controls:ToggleSwitch Grid.Row="8" Grid.Column="1" Margin="5" OnLabel="Yes" OffLabel="No"
VerticalAlignment="Center" HorizontalAlignment="Right" Width="125" VerticalAlignment="Center" HorizontalAlignment="Right" Width="125"
IsChecked="{Binding Path=GeneralSettings.EnablePointersUpdate, Mode=TwoWay}" /> IsChecked="{Binding Path=GeneralSettings.EnablePointersUpdate, Mode=TwoWay}" />
<!-- Logging --> <!-- Logging -->
<Label Grid.Row="8" Grid.Column="0" Margin="5" VerticalAlignment="Center" HorizontalAlignment="Left" <Label Grid.Row="9" Grid.Column="0" Margin="5" VerticalAlignment="Center" HorizontalAlignment="Left"
Content="Log level:" /> Content="Log level:" />
<ComboBox Grid.Row="8" Grid.Column="1" x:Name="LogLevels" Margin="10" VerticalAlignment="Center" <ComboBox Grid.Row="9" Grid.Column="1" x:Name="LogLevels" Margin="10" VerticalAlignment="Center"
HorizontalAlignment="Right" HorizontalAlignment="Right"
Width="140" /> Width="140" />
<Button Grid.Row="9" Grid.Column="1" Margin="10" x:Name="ShowDebug" Content="Show debugger" <Button Grid.Row="10" Grid.Column="1" Margin="10" x:Name="ShowDebug" Content="Show debugger"
VerticalAlignment="Center" VerticalAlignment="Center"
Style="{DynamicResource SquareButtonStyle}" /> Style="{DynamicResource SquareButtonStyle}" />
<!-- Buttons --> <!-- Buttons -->
<Button Grid.Row="10" Grid.Column="0" Margin="10" x:Name="ResetSettings" Content="Reset settings" <Button Grid.Row="11" Grid.Column="0" Margin="10" x:Name="ResetSettings" Content="Reset settings"
VerticalAlignment="Center" HorizontalAlignment="Left" Width="120" VerticalAlignment="Center" HorizontalAlignment="Left" Width="120"
Style="{DynamicResource SquareButtonStyle}" /> Style="{DynamicResource SquareButtonStyle}" />
<Button Grid.Row="10" Grid.Column="1" Margin="10" x:Name="SaveSettings" Content="Save changes" <Button Grid.Row="11" Grid.Column="1" Margin="11" x:Name="SaveSettings" Content="Save changes"
VerticalAlignment="Center" HorizontalAlignment="Right" Width="120" VerticalAlignment="Center" HorizontalAlignment="Right" Width="120"
Style="{DynamicResource SquareButtonStyle}" /> Style="{DynamicResource SquareButtonStyle}" />
<!-- Version --> <!-- Version -->
<Grid Grid.Row="11" Grid.Column="0" Grid.ColumnSpan="2" Margin="10" VerticalAlignment="Bottom"> <Grid Grid.Row="12" Grid.Column="0" Grid.ColumnSpan="2" Margin="10" VerticalAlignment="Bottom">
<Grid.ColumnDefinitions> <Grid.ColumnDefinitions>
<ColumnDefinition Width="*" /> <ColumnDefinition Width="*" />
<ColumnDefinition Width="*" /> <ColumnDefinition Width="*" />