From 47a29f07b95e26d7d481c315be0b91b68090081a Mon Sep 17 00:00:00 2001 From: Ruben Date: Fri, 31 Jul 2020 00:02:44 +0200 Subject: [PATCH] Update shortcuts --- PicView/Shortcuts/MainShortcuts.cs | 38 ++++++++++++++++++++++++++++-- 1 file changed, 36 insertions(+), 2 deletions(-) diff --git a/PicView/Shortcuts/MainShortcuts.cs b/PicView/Shortcuts/MainShortcuts.cs index ec6b79517..b43975221 100644 --- a/PicView/Shortcuts/MainShortcuts.cs +++ b/PicView/Shortcuts/MainShortcuts.cs @@ -157,17 +157,51 @@ internal static void MainWindow_KeysDown(object sender, KeyEventArgs e) return; case Key.Up: - if (Properties.Settings.Default.ScrollEnabled) + if (GetPicGallery != null) { - GetMainWindow.Scroller.ScrollToVerticalOffset(GetMainWindow.Scroller.VerticalOffset - 30); + if (GalleryFunctions.IsOpen) + { + if (Properties.Settings.Default.PicGallery == 1) + { + ScrollTo(true, ctrlDown); + return; + } + else if (ctrlDown) + { + Rotate(true); + } + else + { + Pic(false); + } + } + else if (ctrlDown) + { + Rotate(true); + } } else if (ctrlDown) { Rotate(false); } + if (Properties.Settings.Default.ScrollEnabled) + { + GetMainWindow.Scroller.ScrollToVerticalOffset(GetMainWindow.Scroller.VerticalOffset - 30); + } return; case Key.W: + if (GetPicGallery != null) + { + if (GalleryFunctions.IsOpen) + { + if (Properties.Settings.Default.PicGallery == 1) + { + ScrollTo(true, ctrlDown); + return; + } + } + } if (Properties.Settings.Default.ScrollEnabled) { GetMainWindow.Scroller.ScrollToVerticalOffset(GetMainWindow.Scroller.VerticalOffset - 30);