Browse Source

Update keybindings

Ruben 11 months ago
parent
commit
0ff8d526c8

+ 73 - 70
src/PicView.Avalonia.Win32/WindowsKeybindings.cs

@@ -3,74 +3,77 @@
 public static class WindowsKeybindings
 {
     public const string DefaultKeybindings = """
-                                              {
-                                                "Esc": "Close",
-                                                "F1": "AboutWindow",
-                                                "F2": "Rename",
-                                                "F3": "OpenInExplorer",
-                                                "F4": "SettingsWindow",
-                                                "F5": "Slideshow",
-                                                "F6": "EffectsWindow",
-                                                "F7": "BatchResizeWindow",
-                                                "F10": "ToggleInterface",
-                                                "F11": "ToggleFullScreen",
-                                                "Alt + Enter": "ToggleFullScreen",
-                                                "C": "Crop",
-                                                "Ctrl+C": "CopyImage",
-                                                "Ctrl+Alt+C": "CopyFilePath",
-                                                "Ctrl+Shift+C": "CopyFile",
-                                                "Ctrl+X": "CutFile",
-                                                "Ctrl+V": "Paste",
-                                                "O": "Open",
-                                                "Ctrl+O": "Open",
-                                                "Ctrl+S": "Save",
-                                                "Ctrl+Shift+S": "SaveAs",
-                                                "B": "ChangeBackground",
-                                                "X": "ToggleScroll",
-                                                "Scroll": "ToggleScroll",
-                                                "F": "Flip",
-                                                "Delete": "DeleteFile",
-                                                "Shift+Delete": "DeleteFilePermanently",
-                                                "I": "ImageInfoWindow",
-                                                "K": "KeybindingsWindow",
-                                                "Ctrl+Alt+I": "ResizeImage",
-                                                "Ctrl+I": "ShowFileProperties",
-                                                "Ctrl+P": "Print",
-                                                "R": "ResetZoom",
-                                                "Ctrl+R": "Reload",
-                                                "L": "ToggleLooping",
-                                                "Ctrl+E": "OpenWith",
-                                                "T": "SetTopMost",
-                                                "Ctrl+N": "NewWindow",
-                                                "G": "ToggleGallery",
-                                                "Space": "Center",
-                                                "Home": "ScrollToTop",
-                                                "End": "ScrollToBottom",
-                                                "E": "GalleryClick",
-                                                "Enter": "GalleryClick",
-                                                "A": "Prev",
-                                                "Left": "Prev",
-                                                "Ctrl+A": "First",
-                                                "Ctrl+Left": "First",
-                                                "D": "Next",
-                                                "Right": "Next",
-                                                "Ctrl+Right": "Last",
-                                                "Ctrl+D": "Last",
-                                                "Shift+D": "NextFolder",
-                                                "Shift+Right": "NextFolder",
-                                                "Shift+A": "PrevFolder",
-                                                "Shift+Left": "PrevFolder",
-                                                "W": "Up",
-                                                "Up": "Up",
-                                                "S": "Down",
-                                                "Down": "Down",
-                                                "PageUp": "ScrollUp",
-                                                "PageDown": "ScrollDown",
-                                                "Add": "ZoomIn",
-                                                "OemPlus": "ZoomIn",
-                                                "OemMinus": "ZoomOut",
-                                                "Subtract": "ZoomOut",
-                                                "Alt+Z": "ToggleInterface",
-                                              }
-                                              """;
+                                             {
+                                               "Esc": "Close",
+                                               "F1": "AboutWindow",
+                                               "F2": "Rename",
+                                               "F3": "OpenInExplorer",
+                                               "F4": "SettingsWindow",
+                                               "F5": "Slideshow",
+                                               "F6": "EffectsWindow",
+                                               "F7": "BatchResizeWindow",
+                                               "F10": "ToggleInterface",
+                                               "F11": "Fullscreen",
+                                               "W": "Up",
+                                               "E": "GalleryClick",
+                                               "Enter": "GalleryClick",
+                                               "Ctrl+E": "OpenWith",
+                                               "R": "ResetZoom",
+                                               "Ctrl+R": "Reload",
+                                               "T": "SetTopMost",
+                                               "I": "ImageInfoWindow",
+                                               "Ctrl+I": "ShowFileProperties",
+                                               "Ctrl+Alt+I": "ResizeWindow",
+                                               "O": "Open",
+                                               "Ctrl+O": "Open",
+                                               "Ctrl+P": "Print",
+                                               "A": "Prev",
+                                               "Ctrl+A": "First",
+                                               "Shift+A": "PrevFolder",
+                                               "S": "Down",
+                                               "Ctrl+S": "Save",
+                                               "Ctrl+Shift+S": "SaveAs",
+                                               "D": "Next",
+                                               "Ctrl+D": "Last",
+                                               "Alt+D": "DuplicateFile",
+                                               "Shift+D": "NextFolder",
+                                               "F": "Flip",
+                                               "G": "ToggleGallery",
+                                               "J": "ResizeWindow",
+                                               "K": "KeybindingsWindow",
+                                               "L": "ToggleLooping",
+                                               "Alt+Z": "ToggleInterface",
+                                               "X": "ToggleScroll",
+                                               "Scroll": "ToggleScroll",
+                                               "C": "Crop",
+                                               "Ctrl+C": "CopyImage",
+                                               "Ctrl+Alt+C": "CopyFilePath",
+                                               "Ctrl+Shift+C": "CopyFile",
+                                               "Ctrl+X": "CutFile",
+                                               "V": "Paste",
+                                               "Ctrl+V": "Paste",
+                                               "B": "ChangeBackground",
+                                               "Ctrl+N": "NewWindow",
+                                               "Space": "Center",
+                                               "Home": "ScrollToTop",
+                                               "End": "ScrollToBottom",
+                                               "Left": "Prev",
+                                               "Ctrl+Left": "First",
+                                               "Right": "Next",
+                                               "Ctrl+Right": "Last",
+                                               "Shift+Right": "NextFolder",
+                                               "Shift+Left": "PrevFolder",
+                                               "Up": "Up",
+                                               "PageUp": "ScrollUp",
+                                               "Down": "Down",
+                                               "PageDown": "ScrollDown",
+                                               "Add": "ZoomIn",
+                                               "OemPlus": "ZoomIn",
+                                               "OemMinus": "ZoomOut",
+                                               "Subtract": "ZoomOut",
+                                               "Delete": "DeleteFile",
+                                               "Shift+Delete": "DeleteFilePermanently",
+                                               "Alt+Enter": "Fullscreen"
+                                             }
+                                             """;
 }

+ 19 - 0
src/PicView.Avalonia/Views/KeybindingsView.axaml

@@ -1255,6 +1255,25 @@
                 Width="140" />
         </StackPanel>
 
+        <StackPanel Margin="15,5,10,10" Orientation="Horizontal">
+            <TextBlock
+                Classes="txt"
+                FontFamily="/Assets/Fonts/Roboto-Bold.ttf#Roboto"
+                Text="{CompiledBinding BatchResize}"
+                Width="170" />
+            <customControls:KeybindTextBox
+                Classes="hover TStyle"
+                MethodName="BatchResizeWindow"
+                ToolTip.Tip="{CompiledBinding ChangeKeybindingTooltip}"
+                Width="140" />
+            <customControls:KeybindTextBox
+                Alt="True"
+                Classes="hover TStyle"
+                MethodName="BatchResizeWindow"
+                ToolTip.Tip="{CompiledBinding ChangeKeybindingTooltip}"
+                Width="140" />
+        </StackPanel>
+
         <StackPanel Margin="15,5,10,10" Orientation="Horizontal">
             <TextBlock
                 Classes="txt"