Skip to content

Commit 958ad2d

Browse files
author
Yair Aichenbaum
committed
Moved all shortcuts over to ProHome
1 parent 5cb3fe6 commit 958ad2d

File tree

2 files changed

+19
-35
lines changed

2 files changed

+19
-35
lines changed

Files/App.xaml.cs

Lines changed: 0 additions & 35 deletions
Original file line numberDiff line numberDiff line change
@@ -208,36 +208,6 @@ protected override void OnLaunched(LaunchActivatedEventArgs e)
208208
// Ensure the current window is active
209209
Window.Current.Activate();
210210
Window.Current.CoreWindow.PointerPressed += CoreWindow_PointerPressed;
211-
Window.Current.CoreWindow.Dispatcher.AcceleratorKeyActivated += Dispatcher_AcceleratorKeyActivated;
212-
213-
}
214-
}
215-
216-
private void Dispatcher_AcceleratorKeyActivated(CoreDispatcher sender, AcceleratorKeyEventArgs args)
217-
{
218-
if (args.KeyStatus.IsMenuKeyDown)
219-
{
220-
switch (args.VirtualKey)
221-
{
222-
case VirtualKey.Left:
223-
NavigationActions.Back_Click(null, null);
224-
break;
225-
case VirtualKey.Right:
226-
NavigationActions.Forward_Click(null, null);
227-
break;
228-
case VirtualKey.F:
229-
(App.CurrentInstance.OperationsControl as RibbonArea).RibbonTabView.SelectedIndex = 0;
230-
break;
231-
case VirtualKey.H:
232-
(App.CurrentInstance.OperationsControl as RibbonArea).RibbonTabView.SelectedIndex = 1;
233-
break;
234-
case VirtualKey.S:
235-
(App.CurrentInstance.OperationsControl as RibbonArea).RibbonTabView.SelectedIndex = 2;
236-
break;
237-
case VirtualKey.V:
238-
(App.CurrentInstance.OperationsControl as RibbonArea).RibbonTabView.SelectedIndex = 3;
239-
break;
240-
}
241211
}
242212
}
243213

@@ -268,7 +238,6 @@ protected override void OnActivated(IActivatedEventArgs args)
268238
// Ensure the current window is active.
269239
Window.Current.Activate();
270240
Window.Current.CoreWindow.PointerPressed += CoreWindow_PointerPressed;
271-
Window.Current.CoreWindow.Dispatcher.AcceleratorKeyActivated += Dispatcher_AcceleratorKeyActivated;
272241
return;
273242

274243
case ActivationKind.CommandLineLaunch:
@@ -293,15 +262,12 @@ protected override void OnActivated(IActivatedEventArgs args)
293262
// Ensure the current window is active.
294263
Window.Current.Activate();
295264
Window.Current.CoreWindow.PointerPressed += CoreWindow_PointerPressed;
296-
Window.Current.CoreWindow.Dispatcher.AcceleratorKeyActivated += Dispatcher_AcceleratorKeyActivated;
297-
298265
return;
299266
case ParsedCommandType.Unkwon:
300267
rootFrame.Navigate(typeof(InstanceTabsView), null, new SuppressNavigationTransitionInfo());
301268
// Ensure the current window is active.
302269
Window.Current.Activate();
303270
Window.Current.CoreWindow.PointerPressed += CoreWindow_PointerPressed;
304-
Window.Current.CoreWindow.Dispatcher.AcceleratorKeyActivated += Dispatcher_AcceleratorKeyActivated;
305271
return;
306272
}
307273
}
@@ -314,7 +280,6 @@ protected override void OnActivated(IActivatedEventArgs args)
314280
// Ensure the current window is active.
315281
Window.Current.Activate();
316282
Window.Current.CoreWindow.PointerPressed += CoreWindow_PointerPressed;
317-
Window.Current.CoreWindow.Dispatcher.AcceleratorKeyActivated += Dispatcher_AcceleratorKeyActivated;
318283
}
319284

320285
private void TryEnablePrelaunch()

Files/ProHome.xaml.cs

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -319,8 +319,27 @@ private async void ProHomeInstance_KeyUp(object sender, KeyRoutedEventArgs e)
319319
App.CurrentInstance.InteractionOperations.ToggleQuickLook();
320320
}
321321
break;
322+
case (false, false, true, true, VirtualKey.Left):
323+
NavigationActions.Back_Click(null, null);
324+
break;
325+
case (false, false, true, true, VirtualKey.Right):
326+
NavigationActions.Forward_Click(null, null);
327+
break;
328+
case (false, false, true, true, VirtualKey.F):
329+
(App.CurrentInstance.OperationsControl as RibbonArea).RibbonTabView.SelectedIndex = 0;
330+
break;
331+
case (false, false, true, true, VirtualKey.H):
332+
(App.CurrentInstance.OperationsControl as RibbonArea).RibbonTabView.SelectedIndex = 1;
333+
break;
334+
case (false, false, true, true, VirtualKey.S):
335+
(App.CurrentInstance.OperationsControl as RibbonArea).RibbonTabView.SelectedIndex = 2;
336+
break;
337+
case (false, false, true, true, VirtualKey.V):
338+
(App.CurrentInstance.OperationsControl as RibbonArea).RibbonTabView.SelectedIndex = 3;
339+
break;
322340
};
323341

342+
324343
if (App.CurrentInstance.CurrentPageType == typeof(PhotoAlbum))
325344
{
326345
switch (e.Key)

0 commit comments

Comments
 (0)