summaryrefslogtreecommitdiffstats
path: root/win/CS/HandBrakeWPF/Views/ShellView.xaml.cs
diff options
context:
space:
mode:
authorsr55 <[email protected]>2012-07-08 11:25:45 +0000
committersr55 <[email protected]>2012-07-08 11:25:45 +0000
commitda44aa82136fb9423f041b200b3e40632b8287e7 (patch)
tree3488aa667e0bcb0b8a54eec8c11fd8f98e3c2c41 /win/CS/HandBrakeWPF/Views/ShellView.xaml.cs
parent7746907bf0ae4ef3f02aaa28a34a493dade912a2 (diff)
WinGui: Add support for keyboard shortcuts. These are slightly different to the old UI. See Below.
// Start Encode (Ctrl+S) // Stop Encode (Ctrl+K) // Open Log Window (Ctrl+L) // Open Queue Window (Ctrl+Q) // Add to Queue (Ctrl+A) // Scan a File (Ctrl+F) // Scan a Folder (Ctrl+R) git-svn-id: svn://svn.handbrake.fr/HandBrake/trunk@4820 b64f7644-9d1e-0410-96f1-a4d463321fa5
Diffstat (limited to 'win/CS/HandBrakeWPF/Views/ShellView.xaml.cs')
-rw-r--r--win/CS/HandBrakeWPF/Views/ShellView.xaml.cs20
1 files changed, 19 insertions, 1 deletions
diff --git a/win/CS/HandBrakeWPF/Views/ShellView.xaml.cs b/win/CS/HandBrakeWPF/Views/ShellView.xaml.cs
index 6b291702d..9a24120e1 100644
--- a/win/CS/HandBrakeWPF/Views/ShellView.xaml.cs
+++ b/win/CS/HandBrakeWPF/Views/ShellView.xaml.cs
@@ -4,13 +4,15 @@
// </copyright>
// <summary>
// Interaction logic for ShellView.xaml
-// </summary>
+// </summary>
// --------------------------------------------------------------------------------------------------------------------
namespace HandBrakeWPF.Views
{
using System.Windows;
+ using System.Windows.Input;
+ using HandBrakeWPF.Commands;
using HandBrakeWPF.ViewModels.Interfaces;
/// <summary>
@@ -24,6 +26,22 @@ namespace HandBrakeWPF.Views
public ShellView()
{
this.InitializeComponent();
+
+ // Start Encode (Ctrl+S)
+ // Stop Encode (Ctrl+K)
+ // Open Log Window (Ctrl+L)
+ // Open Queue Window (Ctrl+Q)
+ // Add to Queue (Ctrl+A)
+ // Scan a File (Ctrl+F)
+ // Scan a Folder (Ctrl+R)
+
+ this.InputBindings.Add(new InputBinding(new ProcessShortcutCommand(new KeyGesture(Key.S, ModifierKeys.Control)), new KeyGesture(Key.S, ModifierKeys.Control)));
+ this.InputBindings.Add(new InputBinding(new ProcessShortcutCommand(new KeyGesture(Key.K, ModifierKeys.Control)), new KeyGesture(Key.K, ModifierKeys.Control)));
+ this.InputBindings.Add(new InputBinding(new ProcessShortcutCommand(new KeyGesture(Key.L, ModifierKeys.Control)), new KeyGesture(Key.L, ModifierKeys.Control)));
+ this.InputBindings.Add(new InputBinding(new ProcessShortcutCommand(new KeyGesture(Key.Q, ModifierKeys.Control)), new KeyGesture(Key.Q, ModifierKeys.Control)));
+ this.InputBindings.Add(new InputBinding(new ProcessShortcutCommand(new KeyGesture(Key.A, ModifierKeys.Control)), new KeyGesture(Key.A, ModifierKeys.Control)));
+ this.InputBindings.Add(new InputBinding(new ProcessShortcutCommand(new KeyGesture(Key.F, ModifierKeys.Control)), new KeyGesture(Key.F, ModifierKeys.Control)));
+ this.InputBindings.Add(new InputBinding(new ProcessShortcutCommand(new KeyGesture(Key.R, ModifierKeys.Control)), new KeyGesture(Key.R, ModifierKeys.Control)));
}
/// <summary>