diff --git a/QuickLook/KeystrokeDispatcher.cs b/QuickLook/KeystrokeDispatcher.cs index e9db56c..55a4b65 100644 --- a/QuickLook/KeystrokeDispatcher.cs +++ b/QuickLook/KeystrokeDispatcher.cs @@ -46,7 +46,7 @@ internal class KeystrokeDispatcher : IDisposable _validKeys = [ Keys.Up, Keys.Down, Keys.Left, Keys.Right, - Keys.Enter, Keys.Space, Keys.Escape, Keys.F11 + Keys.Enter, Keys.Space, Keys.Escape, Keys.F5, Keys.F11 ]; } @@ -136,6 +136,10 @@ internal class KeystrokeDispatcher : IDisposable PipeServerManager.SendMessage(PipeMessages.Toggle); break; + case Keys.F5: + PipeServerManager.SendMessage(PipeMessages.Reload); + break; + case Keys.F11: PipeServerManager.SendMessage(PipeMessages.Fullscreen); break; diff --git a/QuickLook/PipeServerManager.cs b/QuickLook/PipeServerManager.cs index 92a3b35..0f5dd72 100644 --- a/QuickLook/PipeServerManager.cs +++ b/QuickLook/PipeServerManager.cs @@ -37,6 +37,7 @@ public static class PipeMessages public const string Close = "QuickLook.App.PipeMessages.Close"; public const string Quit = "QuickLook.App.PipeMessages.Quit"; public const string Fullscreen = "QuickLook.App.PipeMessages.Fullscreen"; + public const string Reload = "QuickLook.App.PipeMessages.Reload"; } public class PipeServerManager : IDisposable @@ -168,6 +169,12 @@ public class PipeServerManager : IDisposable DispatcherPriority.ApplicationIdle); return false; + case PipeMessages.Reload: + Application.Current.Dispatcher.BeginInvoke( + new Action(() => ViewWindowManager.GetInstance().ReloadPreview()), + DispatcherPriority.ApplicationIdle); + return false; + case PipeMessages.Quit: return true; diff --git a/QuickLook/ViewerWindow.xaml b/QuickLook/ViewerWindow.xaml index 7ea0695..147cf9b 100644 --- a/QuickLook/ViewerWindow.xaml +++ b/QuickLook/ViewerWindow.xaml @@ -132,7 +132,7 @@ ToolTip="More"> - +