Skip to content

Commit

Permalink
Add "Deskew" keyboard shortcut
Browse files Browse the repository at this point in the history
  • Loading branch information
cyanfish committed Feb 2, 2025
1 parent 423a6e6 commit 951c6fa
Show file tree
Hide file tree
Showing 5 changed files with 5 additions and 0 deletions.
1 change: 1 addition & 0 deletions NAPS2.Lib/Config/InternalDefaults.cs
Original file line number Diff line number Diff line change
Expand Up @@ -176,6 +176,7 @@ public static CommonConfig GetCommonConfig() =>
RotateRight = "Mod+Shift+Right",
RotateFlip = "Mod+Shift+Down",
RotateCustom = "",
RotateDeskew = "",
MoveUp = "Mod+Up",
MoveDown = "Mod+Down",
ReorderInterleave = "",
Expand Down
1 change: 1 addition & 0 deletions NAPS2.Lib/Config/KeyboardShortcuts.cs
Original file line number Diff line number Diff line change
Expand Up @@ -56,6 +56,7 @@ public class KeyboardShortcuts
public string? RotateLeft { get; set; }
public string? RotateRight { get; set; }
public string? RotateFlip { get; set; }
public string? RotateDeskew { get; set; }
public string? RotateCustom { get; set; }

public string? MoveUp { get; set; }
Expand Down
1 change: 1 addition & 0 deletions NAPS2.Lib/EtoForms/Desktop/DesktopKeyboardShortcuts.cs
Original file line number Diff line number Diff line change
Expand Up @@ -77,6 +77,7 @@ public void Assign(DesktopCommands commands)
_ksm.Assign(ks.ReorderReverseAll, commands.ReverseAll);
_ksm.Assign(ks.ReorderReverseSelected, commands.ReverseSelected);
_ksm.Assign(ks.RotateCustom, commands.CustomRotate);
_ksm.Assign(ks.RotateDeskew, commands.Deskew);
_ksm.Assign(ks.RotateFlip, commands.Flip);
_ksm.Assign(ks.RotateLeft, commands.RotateLeft);
_ksm.Assign(ks.RotateRight, commands.RotateRight);
Expand Down
1 change: 1 addition & 0 deletions NAPS2.Lib/EtoForms/Ui/KeyboardShortcutsForm.cs
Original file line number Diff line number Diff line change
Expand Up @@ -63,6 +63,7 @@ public class KeyboardShortcutsForm : EtoDialogBase
new(UiStrings.RotateLeft, c => c.KeyboardShortcuts.RotateLeft),
new(UiStrings.RotateRight, c => c.KeyboardShortcuts.RotateRight),
new(UiStrings.Flip, c => c.KeyboardShortcuts.RotateFlip),
new(UiStrings.Deskew, c => c.KeyboardShortcuts.RotateDeskew),
new(UiStrings.CustomRotation, c => c.KeyboardShortcuts.RotateCustom),
Shortcut.Separator,
new(UiStrings.MoveUp, c => c.KeyboardShortcuts.MoveUp),
Expand Down
1 change: 1 addition & 0 deletions NAPS2.Lib/EtoForms/Ui/PreviewForm.cs
Original file line number Diff line number Diff line change
Expand Up @@ -357,6 +357,7 @@ private void AssignKeyboardShortcuts()
_previewKsm.Assign(ks.ImageCombine, Commands.Combine);

_previewKsm.Assign(ks.RotateCustom, Commands.CustomRotate);
_previewKsm.Assign(ks.RotateDeskew, Commands.Deskew);
_previewKsm.Assign(ks.RotateFlip, Commands.Flip);
_previewKsm.Assign(ks.RotateLeft, Commands.RotateLeft);
_previewKsm.Assign(ks.RotateRight, Commands.RotateRight);
Expand Down

0 comments on commit 951c6fa

Please sign in to comment.