summaryrefslogtreecommitdiffstats
path: root/win/CS/HandBrakeWPF/Views
diff options
context:
space:
mode:
authorsr55 <[email protected]>2018-02-10 21:22:53 +0000
committersr55 <[email protected]>2018-02-10 21:22:53 +0000
commit6b4325cfd832590c54863c688262e4a923717486 (patch)
tree0accf6bbd23a4e01313a617f8c3f4b7f98058f3f /win/CS/HandBrakeWPF/Views
parent0a9ed4041460e099a714059148a4f844125aa64d (diff)
WinGui: New shortcuts for easier accessibility. Ctrl 1 through 7 activate given tabs and set focus to allow easier tab navigation of the guil
Diffstat (limited to 'win/CS/HandBrakeWPF/Views')
-rw-r--r--win/CS/HandBrakeWPF/Views/MainView.xaml6
-rw-r--r--win/CS/HandBrakeWPF/Views/MainView.xaml.cs2
-rw-r--r--win/CS/HandBrakeWPF/Views/ShellView.xaml.cs11
3 files changed, 16 insertions, 3 deletions
diff --git a/win/CS/HandBrakeWPF/Views/MainView.xaml b/win/CS/HandBrakeWPF/Views/MainView.xaml
index dfbc93c7c..049e31a28 100644
--- a/win/CS/HandBrakeWPF/Views/MainView.xaml
+++ b/win/CS/HandBrakeWPF/Views/MainView.xaml
@@ -465,9 +465,9 @@
<!-- Tab Control -->
<TabControl Name="tabControl" IsEnabled="{Binding HasSource, Converter={StaticResource booleanConverter}, ConverterParameter=false}"
- Grid.Row="2"
- Margin="15,10,10,6"
- HorizontalAlignment="Stretch"
+ Grid.Row="2" Margin="15,10,10,6"
+ SelectedIndex="{Binding SelectedTab}"
+ HorizontalAlignment="Stretch"
VerticalAlignment="Stretch"
SelectionChanged="TabControl_OnSelectionChanged"
Visibility="{Binding IsQueueShowingInLine, Converter={StaticResource boolToVisConverter}, ConverterParameter=true}">
diff --git a/win/CS/HandBrakeWPF/Views/MainView.xaml.cs b/win/CS/HandBrakeWPF/Views/MainView.xaml.cs
index 26ac5a340..922746bee 100644
--- a/win/CS/HandBrakeWPF/Views/MainView.xaml.cs
+++ b/win/CS/HandBrakeWPF/Views/MainView.xaml.cs
@@ -73,6 +73,8 @@ namespace HandBrakeWPF.Views
{
((MainViewModel)this.DataContext).SummaryViewModel.UpdateDisplayedInfo();
}
+
+ this.tabControl.Focus();
}
}
diff --git a/win/CS/HandBrakeWPF/Views/ShellView.xaml.cs b/win/CS/HandBrakeWPF/Views/ShellView.xaml.cs
index 6fe0187bc..c5c632c9f 100644
--- a/win/CS/HandBrakeWPF/Views/ShellView.xaml.cs
+++ b/win/CS/HandBrakeWPF/Views/ShellView.xaml.cs
@@ -76,6 +76,17 @@ namespace HandBrakeWPF.Views
this.InputBindings.Add(new InputBinding(new ProcessShortcutCommand(new KeyGesture(Key.G, ModifierKeys.Control | ModifierKeys.Shift)), new KeyGesture(Key.G, ModifierKeys.Control | ModifierKeys.Shift))); // Garbage Colleciton
this.InputBindings.Add(new InputBinding(new ProcessShortcutCommand(new KeyGesture(Key.F1, ModifierKeys.None)), new KeyGesture(Key.F1, ModifierKeys.None))); // Help
+
+ // Tabs Switching
+ this.InputBindings.Add(new InputBinding(new ProcessShortcutCommand(new KeyGesture(Key.D1, ModifierKeys.Control)), new KeyGesture(Key.D1, ModifierKeys.Control)));
+ this.InputBindings.Add(new InputBinding(new ProcessShortcutCommand(new KeyGesture(Key.D2, ModifierKeys.Control)), new KeyGesture(Key.D2, ModifierKeys.Control)));
+ this.InputBindings.Add(new InputBinding(new ProcessShortcutCommand(new KeyGesture(Key.D3, ModifierKeys.Control)), new KeyGesture(Key.D3, ModifierKeys.Control)));
+ this.InputBindings.Add(new InputBinding(new ProcessShortcutCommand(new KeyGesture(Key.D4, ModifierKeys.Control)), new KeyGesture(Key.D4, ModifierKeys.Control)));
+ this.InputBindings.Add(new InputBinding(new ProcessShortcutCommand(new KeyGesture(Key.D5, ModifierKeys.Control)), new KeyGesture(Key.D5, ModifierKeys.Control)));
+ this.InputBindings.Add(new InputBinding(new ProcessShortcutCommand(new KeyGesture(Key.D6, ModifierKeys.Control)), new KeyGesture(Key.D6, ModifierKeys.Control)));
+ this.InputBindings.Add(new InputBinding(new ProcessShortcutCommand(new KeyGesture(Key.D7, ModifierKeys.Control)), new KeyGesture(Key.D7, ModifierKeys.Control)));
+
+
// Enable Windows 7 Taskbar progress indication.
if (this.TaskbarItemInfo == null)
{