Skip to content

Commit

Permalink
add PageUp, PageDown hotkey for view next/previous image
Browse files Browse the repository at this point in the history
  • Loading branch information
d2phap committed Jan 7, 2024
1 parent bf006b5 commit 0189a28
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 3 deletions.
6 changes: 5 additions & 1 deletion Source/Components/ImageGlass.Base/Types/HotKey.cs
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,11 @@ public string KeyStr
{
var str = KeyCode == Keys.None ? string.Empty : KeyCode.ToString();

if (str.StartsWith("Oem")
if (str.Equals(nameof(Keys.Next)))
{
str = "PageDown";
}
else if (str.StartsWith("Oem")
|| (str.StartsWith('D') && str.Length == 2) // D0 -> D9
)
{
Expand Down
4 changes: 2 additions & 2 deletions Source/ImageGlass/FrmMain/FrmMain.Configs.cs
Original file line number Diff line number Diff line change
Expand Up @@ -56,8 +56,8 @@ public partial class FrmMain
{ nameof(MnuUnload), [new(Keys.U)] },

// MnuNavigation
{ nameof(MnuViewNext), [new(Keys.Right)] },
{ nameof(MnuViewPrevious), [new(Keys.Left)] },
{ nameof(MnuViewNext), [new(Keys.Right), new(Keys.PageUp)] },
{ nameof(MnuViewPrevious), [new(Keys.Left), new(Keys.PageDown)] },
{ nameof(MnuGoTo), [new(Keys.F)] },
{ nameof(MnuGoToFirst), [new(Keys.Home)] },
{ nameof(MnuGoToLast), [new(Keys.End)] },
Expand Down

0 comments on commit 0189a28

Please sign in to comment.