Browse Source

Merge pull request #888 from PixiEditor/fixes/11.04.2025

Fixes/11.04.2025
Krzysztof Krysiński 4 months ago
parent
commit
48c073709f

+ 1 - 1
src/Drawie

@@ -1 +1 @@
-Subproject commit 252fe53970fb1770a2400eb964fbc214f4b92121
+Subproject commit 67e28c2a97d6002457875a3e81eb5c51ca8f4201

+ 1 - 1
src/PixiEditor.ChangeableDocument/Changeables/Graph/Nodes/ImageLayerNode.cs

@@ -267,7 +267,7 @@ public class ImageLayerNode : LayerNode, IReadOnlyImageNode
     public override void Dispose()
     {
         base.Dispose();
-        fullResrenderedSurface.Dispose();
+        fullResrenderedSurface?.Dispose();
     }
 
     IReadOnlyChunkyImage IReadOnlyImageNode.GetLayerImageAtFrame(int frame) => GetLayerImageAtFrame(frame);

+ 658 - 597
src/PixiEditor/Data/ShortcutActionMaps/AsepriteShortcutMap.json

@@ -1,598 +1,659 @@
 {
-    "Cut": {
-      "Command": "PixiEditor.Clipboard.Cut",
-      "DefaultShortcut": {
-        "key": "X",
-        "modifiers": ["Ctrl"]
-      },
-      "Parameters": []
-    },
-    "Paste": {
-      "Command": "PixiEditor.Clipboard.Paste",
-      "DefaultShortcut": {
-        "key": "V",
-        "modifiers": ["Ctrl"]
-      },
-      "Parameters": []
-    },
-    "": {
-      "Command": "PixiEditor.Clipboard.PasteColor",
-      "DefaultShortcut": {
-        "key": "None",
-        "modifiers": null
-      },
-      "Parameters": []
-    },
-    "Copy": {
-      "Command": "PixiEditor.Clipboard.Copy",
-      "DefaultShortcut": {
-        "key": "C",
-        "modifiers": ["Ctrl"]
-      },
-      "Parameters": []
-    },
-    "": {
-      "Command": "PixiEditor.Colors.OpenPaletteBrowser",
-      "DefaultShortcut": {
-        "key": "None",
-        "modifiers": null
-      },
-      "Parameters": []
-    },
-    "LoadPalette": {
-      "Command": "PixiEditor.Colors.ImportPalette",
-      "DefaultShortcut": {
-        "key": "None",
-        "modifiers": null
-      },
-      "Parameters": []
-    },
-    "": {
-      "Command": "PixiEditor.Colors.SelectFirstPaletteColor",
-      "DefaultShortcut": {
-        "key": "None",
-        "modifiers": null
-      },
-      "Parameters": []
-    },
-    "": {
-      "Command": "PixiEditor.Colors.SelectSecondPaletteColor",
-      "DefaultShortcut": {
-        "key": "None",
-        "modifiers": null
-      },
-      "Parameters": []
-    },
-    "": {
-      "Command": "PixiEditor.Colors.SelectThirdPaletteColor",
-      "DefaultShortcut": {
-        "key": "None",
-        "modifiers": null
-      },
-      "Parameters": []
-    },
-    "": {
-      "Command": "PixiEditor.Colors.SelectFourthPaletteColor",
-      "DefaultShortcut": {
-        "key": "None",
-        "modifiers": null
-      },
-      "Parameters": []
-    },
-    "": {
-      "Command": "PixiEditor.Colors.SelectFifthPaletteColor",
-      "DefaultShortcut": {
-        "key": "None",
-        "modifiers": null
-      },
-      "Parameters": []
-    },
-    "": {
-      "Command": "PixiEditor.Colors.SelectSixthPaletteColor",
-      "DefaultShortcut": {
-        "key": "None",
-        "modifiers": null
-      },
-      "Parameters": []
-    },
-    "": {
-      "Command": "PixiEditor.Colors.SelectSeventhPaletteColor",
-      "DefaultShortcut": {
-        "key": "None",
-        "modifiers": null
-      },
-      "Parameters": []
-    },
-    "": {
-      "Command": "PixiEditor.Colors.SelectEighthPaletteColor",
-      "DefaultShortcut": {
-        "key": "None",
-        "modifiers": null
-      },
-      "Parameters": []
-    },
-    "": {
-      "Command": "PixiEditor.Colors.SelectNinthPaletteColor",
-      "DefaultShortcut": {
-        "key": "None",
-        "modifiers": null
-      },
-      "Parameters": []
-    },
-    "": {
-      "Command": "PixiEditor.Colors.SelectTenthPaletteColor",
-      "DefaultShortcut": {
-        "key": "None",
-        "modifiers": null
-      },
-      "Parameters": []
-    },
-    "SwitchColors": {
-      "Command": "PixiEditor.Colors.Swap",
-      "DefaultShortcut": {
-        "key": "X",
-        "modifiers": null
-      },
-      "Parameters": []
-    },
-    "": {
-      "Command": "PixiEditor.Colors.RemoveSwatch",
-      "DefaultShortcut": {
-        "key": "None",
-        "modifiers": null
-      },
-      "Parameters": []
-    },
-    "NewFile": {
-      "Command": "PixiEditor.File.New",
-      "DefaultShortcut": {
-        "key": "N",
-        "modifiers": ["Ctrl"]
-      },
-      "Parameters": []
-    },
-    "OpenFile": {
-      "Command": "PixiEditor.File.Open",
-      "DefaultShortcut": {
-        "key": "O",
-        "modifiers": ["Ctrl"]
-      },
-      "Parameters": []
-    },
-    "Recent": {
-      "Command": "PixiEditor.File.OpenRecent",
-      "DefaultShortcut": {
-        "key": "None",
-        "modifiers": null
-      },
-      "Parameters": []
-    },
-    "SaveFile": {
-      "Command": "PixiEditor.File.Save",
-      "DefaultShortcut": {
-        "key": "S",
-        "modifiers": ["Ctrl"]
-      },
-      "Parameters": []
-    },
-    "SaveFileAs": {
-      "Command": "PixiEditor.File.SaveAsNew",
-      "DefaultShortcut": {
-        "key": "S",
-        "modifiers": ["Ctrl", "Shift"]
-      },
-      "Parameters": []
-    },
-    "SaveFileCopyAs": {
-      "Command": "PixiEditor.File.Export",
-      "DefaultShortcut": {
-        "key": "S",
-        "modifiers": ["Ctrl", "Alt", "Shift"]
-      },
-      "Parameters": []
-    },
-    "RemoveLayer": {
-      "Command": "PixiEditor.Layer.DeleteAllSelected",
-      "DefaultShortcut": {
-        "key": "None",
-        "modifiers": null
-      },
-      "Parameters": []
-    },
-    "NewLayer.group=true": {
-      "Command": "PixiEditor.Layer.NewFolder",
-      "DefaultShortcut": {
-        "key": "N",
-        "modifiers": ["Alt", "Shift"]
-      },
-      "Parameters": []
-    },
-    "NewLayer": {
-      "Command": "PixiEditor.Layer.NewLayer",
-      "DefaultShortcut": {
-        "key": "N",
-        "modifiers": ["Shift"]
-      },
-      "Parameters": []
-    },
-    "SetInkType.type=lock-alpha": {
-      "Command": "PixiEditor.Layer.ToggleLockTransparency",
-      "DefaultShortcut": {
-        "key": "None",
-        "modifiers": null
-      },
-      "Parameters": []
-    },
-    "DuplicateLayer": {
-      "Command": "PixiEditor.Layer.DuplicateSelectedMember",
-      "DefaultShortcut": {
-        "key": "None",
-        "modifiers": null
-      },
-      "Parameters": []
-    },
-    "": {
-      "Command": "PixiEditor.Layer.CreateMask",
-      "DefaultShortcut": {
-        "key": "None",
-        "modifiers": null
-      },
-      "Parameters": []
-    },
-    "": {
-      "Command": "PixiEditor.Layer.DeleteMask",
-      "DefaultShortcut": {
-        "key": "None",
-        "modifiers": null
-      },
-      "Parameters": []
-    },
-    "": {
-      "Command": "PixiEditor.Layer.MoveSelectedMemberUpwards",
-      "DefaultShortcut": {
-        "key": "None",
-        "modifiers": null
-      },
-      "Parameters": []
-    },
-    "": {
-      "Command": "PixiEditor.Layer.MoveSelectedMemberDownwards",
-      "DefaultShortcut": {
-        "key": "None",
-        "modifiers": null
-      },
-      "Parameters": []
-    },
-    "": {
-      "Command": "PixiEditor.Layer.MergeSelected",
-      "DefaultShortcut": {
-        "key": "None",
-        "modifiers": null
-      },
-      "Parameters": []
-    },
-    "": {
-      "Command": "PixiEditor.Layer.MergeWithAbove",
-      "DefaultShortcut": {
-        "key": "None",
-        "modifiers": null
-      },
-      "Parameters": []
-    },
-    "MergeDownLayer": {
-      "Command": "PixiEditor.Layer.MergeWithBelow",
-      "DefaultShortcut": {
-        "key": "None",
-        "modifiers": null
-      },
-      "Parameters": []
-    },
-    "Launch.path=/docs/.type=url": {
-      "Command": "PixiEditor.Links.OpenDocumentation",
-      "DefaultShortcut": {
-        "key": "B",
-        "modifiers": null
-      },
-      "Parameters": []
-    },
-    "MaskAll": {
-      "Command": "PixiEditor.Selection.SelectAll",
-      "DefaultShortcut": {
-        "key": "A",
-        "modifiers": ["Ctrl"]
-      },
-      "Parameters": []
-    },
-    "DeselectMask": {
-      "Command": "PixiEditor.Selection.Clear",
-      "DefaultShortcut": {
-        "key": "D",
-        "modifiers": ["Ctrl"]
-      },
-      "Parameters": []
-    },
-    "": {
-      "Command": "PixiEditor.Selection.TransformArea",
-      "DefaultShortcut": {
-        "key": "None",
-        "modifiers": null
-      },
-      "Parameters": []
-    },
-    "": {
-      "Command": "PixiEditor.Stylus.TogglePenMode",
-      "DefaultShortcut": {
-        "key": "None",
-        "modifiers": null
-      },
-      "Parameters": []
-    },
-    "ChangeBrush.change=increment-size": {
-      "Command": "PixiEditor.Tools.IncreaseSize",
-      "DefaultShortcut": {
-        "key": "+",
-        "modifiers": null
-      },
-      "Parameters": []
-    },
-    "ChangeBrush.change=decrement-size": {
-      "Command": "PixiEditor.Tools.DecreaseSize",
-      "DefaultShortcut": {
-        "key": "-",
-        "modifiers": null
-      },
-      "Parameters": []
-    },
-    "Redo": {
-      "Command": "PixiEditor.Undo.Redo",
-      "DefaultShortcut": {
-        "key": "None",
-        "modifiers": ["Ctrl"]
-      },
-      "Parameters": []
-    },
-    "Undo": {
-      "Command": "PixiEditor.Undo.Undo",
-      "DefaultShortcut": {
-        "key": "Z",
-        "modifiers": ["Ctrl"]
-      },
-      "Parameters": []
-    },
-    "ShowGrid": {
-      "Command": "PixiEditor.View.ToggleGrid",
-      "DefaultShortcut": {
-        "key": "'",
-        "modifiers": ["Ctrl"]
-      },
-      "Parameters": []
-    },
-    "Zoom.action=in": {
-      "Command": "PixiEditor.View.ZoomIn",
-      "DefaultShortcut": {
-        "key": "+",
-        "modifiers": ["Ctrl"]
-      },
-      "Parameters": []
-    },
-    "Zoom.action=out": {
-      "Command": "PixiEditor.View.Zoomout",
-      "DefaultShortcut": {
-        "key": "-",
-        "modifiers": ["Ctrl"]
-      },
-      "Parameters": []
-    },
-    "": {
-      "Command": "PixiEditor.Window.CreateNewViewport",
-      "DefaultShortcut": {
-        "key": "None",
-        "modifiers": null
-      },
-      "Parameters": []
-    },
-    "Options": {
-      "Command": "PixiEditor.Window.OpenSettingsWindow",
-      "DefaultShortcut": {
-        "key": "K",
-        "modifiers": ["Ctrl"]
-      },
-      "Parameters": []
-    },
-    "Home": {
-      "Command": "PixiEditor.Window.OpenStartupWindow",
-      "DefaultShortcut": {
-        "key": "None",
-        "modifiers": null
-      },
-      "Parameters": []
-    },
-    "KeyboardShortcuts": {
-      "Command": "PixiEditor.Window.OpenShortcutWindow",
-      "DefaultShortcut": {
-        "key": "F7",
-        "modifiers": [
-            "Ctrl",
-            "Alt",
-            "Shift"
-        ]
-      },
-      "Parameters": []
-    },
-    "About": {
-      "Command": "PixiEditor.Window.OpenAboutWindow",
-      "DefaultShortcut": {
-        "key": "None",
-        "modifiers": null
-      },
-      "Parameters": []
-    },
-    "TogglePreview": {
-      "Command": "PixiEditor.Window.OpenPreviewWindow",
-      "DefaultShortcut": {
-        "key": "F7",
-        "modifiers": null
-      },
-      "Parameters": []
-    },
-    "": {
-      "Command": "PixiEditor.Document.ClipCanvas",
-      "DefaultShortcut": {
-        "key": "None",
-        "modifiers": null
-      },
-      "Parameters": []
-    },
-    "SymmetryMode.orientation=vertical": {
-      "Command": "PixiEditor.Document.ToggleVerticalSymmetryAxis",
-      "DefaultShortcut": {
-        "key": "None",
-        "modifiers": null
-      },
-      "Parameters": []
-    },
-    "SymmetryMode.orientation=horizontal": {
-      "Command": "PixiEditor.Document.ToggleHorizontalSymmetryAxis",
-      "DefaultShortcut": {
-        "key": "None",
-        "modifiers": null
-      },
-      "Parameters": []
-    },
-    "Clear": {
-      "Command": "PixiEditor.Document.DeleteSelected",
-      "DefaultShortcut": {
-        "key": "Delete",
-        "modifiers": null
-      },
-      "Parameters": []
-    },
-    "SpriteSize": {
-      "Command": "PixiEditor.Document.ResizeDocument",
-      "DefaultShortcut": {
-        "key": "None",
-        "modifiers": null
-      },
-      "Parameters": []
-    },
-    "CanvasSize": {
-      "Command": "PixiEditor.Document.ResizeCanvas",
-      "DefaultShortcut": {
-        "key": "C",
-        "modifiers": null
-      },
-      "Parameters": []
-    },
-    "": {
-      "Command": "PixiEditor.Document.CenterContent",
-      "DefaultShortcut": {
-        "key": "None",
-        "modifiers": null
-      },
-      "Parameters": []
-    },
-    "eyedropper": {
-      "Command": "PixiEditor.Tools.Select.ColorPickerToolViewModel",
-      "DefaultShortcut": {
-        "key": "I",
-        "modifiers": null
-      },
-      "Parameters": []
-    },
-    "ellipse": {
-      "Command": "PixiEditor.Tools.Select.EllipseToolViewModel",
-      "DefaultShortcut": {
-        "key": "U",
-        "modifiers": [ "Shift" ]
-      },
-      "Parameters": []
-    },
-    "eraser": {
-      "Command": "PixiEditor.Tools.Select.EraserToolViewModel",
-      "DefaultShortcut": {
-        "key": "E",
-        "modifiers": null
-      },
-      "Parameters": []
-    },
-    "paint_bucket": {
-      "Command": "PixiEditor.Tools.Select.FloodFillToolViewModel",
-      "DefaultShortcut": {
-        "key": "G",
-        "modifiers": null
-      },
-      "Parameters": []
-    },
-    "lasso": {
-      "Command": "PixiEditor.Tools.Select.LassoToolViewModel",
-      "DefaultShortcut": {
-        "key": "Q",
-        "modifiers": null
-      },
-      "Parameters": []
-    },
-    "line": {
-      "Command": "PixiEditor.Tools.Select.LineToolViewModel",
-      "DefaultShortcut": {
-        "key": "L",
-        "modifiers": null
-      },
-      "Parameters": []
-    },
-    "magic_wand": {
-      "Command": "PixiEditor.Tools.Select.MagicWandToolViewModel",
-      "DefaultShortcut": {
-        "key": "W",
-        "modifiers": null
-      },
-      "Parameters": []
-    },
-    "move": {
-      "Command": "PixiEditor.Tools.Select.MoveToolViewModel",
-      "DefaultShortcut": {
-        "key": "V",
-        "modifiers": null
-      },
-      "Parameters": []
-    },
-    "hand": {
-      "Command": "PixiEditor.Tools.Select.MoveViewportToolViewModel",
-      "DefaultShortcut": {
-        "key": "H",
-        "modifiers": null
-      },
-      "Parameters": []
-    },
-    "pencil": {
-      "Command": "PixiEditor.Tools.Select.PenToolViewModel",
-      "DefaultShortcut": {
-        "key": "B",
-        "modifiers": null
-      },
-      "Parameters": []
-    },
-    "rectangle": {
-      "Command": "PixiEditor.Tools.Select.RectangleToolViewModel",
-      "DefaultShortcut": {
-        "key": "U",
-        "modifiers": null
-      },
-      "Parameters": []
-    },
-    "rectangular_marquee": {
-      "Command": "PixiEditor.Tools.Select.SelectToolViewModel",
-      "DefaultShortcut": {
-        "key": "M",
-        "modifiers": null
-      },
-      "Parameters": []
-    },
-    "zoom": {
-      "Command": "PixiEditor.Tools.Select.ZoomToolViewModel",
-      "DefaultShortcut": {
-        "key": "Z",
-        "modifiers": null
-      },
-      "Parameters": []
-    }
-  }
+  "Cut": {
+    "Commands": [
+      "PixiEditor.Clipboard.Cut"
+    ],
+    "DefaultShortcut": {
+      "key": "X",
+      "modifiers": [
+        "Ctrl"
+      ]
+    },
+    "Parameters": []
+  },
+  "Paste": {
+    "Commands": [
+      "PixiEditor.Clipboard.Paste",
+      "PixiEditor.Clipboard.PasteNodes",
+      "PixiEditor.Clipboard.PasteCels"
+    ],
+    "DefaultShortcut": {
+      "key": "V",
+      "modifiers": [
+        "Ctrl"
+      ]
+    },
+    "Parameters": []
+  },
+  "": {
+    "Commands": [
+      "PixiEditor.Document.CenterContent"
+    ],
+    "DefaultShortcut": {
+      "key": "None",
+      "modifiers": null
+    },
+    "Parameters": []
+  },
+  "Copy": {
+    "Commands": [
+      "PixiEditor.Clipboard.Copy"
+    ],
+    "DefaultShortcut": {
+      "key": "C",
+      "modifiers": [
+        "Ctrl"
+      ]
+    },
+    "Parameters": []
+  },
+  "LoadPalette": {
+    "Commands": [
+      "PixiEditor.Colors.ImportPalette"
+    ],
+    "DefaultShortcut": {
+      "key": "None",
+      "modifiers": null
+    },
+    "Parameters": []
+  },
+  "SwitchColors": {
+    "Commands": [
+      "PixiEditor.Colors.Swap"
+    ],
+    "DefaultShortcut": {
+      "key": "X",
+      "modifiers": null
+    },
+    "Parameters": []
+  },
+  "NewFile": {
+    "Commands": [
+      "PixiEditor.File.New"
+    ],
+    "DefaultShortcut": {
+      "key": "N",
+      "modifiers": [
+        "Ctrl"
+      ]
+    },
+    "Parameters": []
+  },
+  "OpenFile": {
+    "Commands": [
+      "PixiEditor.File.Open"
+    ],
+    "DefaultShortcut": {
+      "key": "O",
+      "modifiers": [
+        "Ctrl"
+      ]
+    },
+    "Parameters": []
+  },
+  "Recent": {
+    "Commands": [
+      "PixiEditor.File.OpenRecent"
+    ],
+    "DefaultShortcut": {
+      "key": "None",
+      "modifiers": null
+    },
+    "Parameters": []
+  },
+  "SaveFile": {
+    "Commands": [
+      "PixiEditor.File.Save"
+    ],
+    "DefaultShortcut": {
+      "key": "S",
+      "modifiers": [
+        "Ctrl"
+      ]
+    },
+    "Parameters": []
+  },
+  "SaveFileAs": {
+    "Commands": [
+      "PixiEditor.File.SaveAsNew"
+    ],
+    "DefaultShortcut": {
+      "key": "S",
+      "modifiers": [
+        "Ctrl",
+        "Shift"
+      ]
+    },
+    "Parameters": []
+  },
+  "SaveFileCopyAs": {
+    "Commands": [
+      "PixiEditor.File.Export"
+    ],
+    "DefaultShortcut": {
+      "key": "S",
+      "modifiers": [
+        "Ctrl",
+        "Alt",
+        "Shift"
+      ]
+    },
+    "Parameters": []
+  },
+  "RemoveLayer": {
+    "Commands": [
+      "PixiEditor.Layer.DeleteAllSelected"
+    ],
+    "DefaultShortcut": {
+      "key": "Delete",
+      "modifiers": null
+    },
+    "Parameters": []
+  },
+  "NewLayer.group=true": {
+    "Commands": [
+      "PixiEditor.Layer.NewFolder"
+    ],
+    "DefaultShortcut": {
+      "key": "N",
+      "modifiers": [
+        "Alt",
+        "Shift"
+      ]
+    },
+    "Parameters": []
+  },
+  "NewLayer": {
+    "Commands": [
+      "PixiEditor.Layer.NewLayer"
+    ],
+    "DefaultShortcut": {
+      "key": "N",
+      "modifiers": [
+        "Shift"
+      ]
+    },
+    "Parameters": []
+  },
+  "NewLayer.fromClipboard=true": {
+    "Commands": [
+      "PixiEditor.Clipboard.PasteAsNewLayer"
+    ],
+    "DefaultShortcut": {
+      "key": "V",
+      "modifiers": [
+        "Ctrl",
+        "Shift"
+      ]
+    },
+    "Parameters": []
+  },
+  "SetInkType.type=lock-alpha": {
+    "Commands": [
+      "PixiEditor.Layer.ToggleLockTransparency"
+    ],
+    "DefaultShortcut": {
+      "key": "None",
+      "modifiers": null
+    },
+    "Parameters": []
+  },
+  "DuplicateLayer": {
+    "Commands": [
+      "PixiEditor.Layer.DuplicateSelectedMember"
+    ],
+    "DefaultShortcut": {
+      "key": "None",
+      "modifiers": null
+    },
+    "Parameters": []
+  },
+  "MergeDownLayer": {
+    "Commands": [
+      "PixiEditor.Layer.MergeWithBelow"
+    ],
+    "DefaultShortcut": {
+      "key": "None",
+      "modifiers": null
+    },
+    "Parameters": []
+  },
+  "Launch.path=/docs/.type=url": {
+    "Commands": [
+      "PixiEditor.Links.OpenDocumentation"
+    ],
+    "DefaultShortcut": {
+      "key": "B",
+      "modifiers": null
+    },
+    "Parameters": []
+  },
+  "MaskAll": {
+    "Commands": [
+      "PixiEditor.Selection.SelectAll"
+    ],
+    "DefaultShortcut": {
+      "key": "A",
+      "modifiers": [
+        "Ctrl"
+      ]
+    },
+    "Parameters": []
+  },
+  "DeselectMask": {
+    "Commands": [
+      "PixiEditor.Selection.Clear"
+    ],
+    "DefaultShortcut": {
+      "key": "D",
+      "modifiers": [
+        "Ctrl"
+      ]
+    },
+    "Parameters": []
+  },
+  "ChangeBrush.change=increment-size": {
+    "Commands": [
+      "PixiEditor.Tools.IncreaseSize"
+    ],
+    "DefaultShortcut": {
+      "key": "+",
+      "modifiers": null
+    },
+    "Parameters": []
+  },
+  "ChangeBrush.change=decrement-size": {
+    "Commands": [
+      "PixiEditor.Tools.DecreaseSize"
+    ],
+    "DefaultShortcut": {
+      "key": "-",
+      "modifiers": null
+    },
+    "Parameters": []
+  },
+  "Redo": {
+    "Commands": [
+      "PixiEditor.Undo.Redo"
+    ],
+    "DefaultShortcut": {
+      "key": "Y",
+      "modifiers": [
+        "Ctrl"
+      ]
+    },
+    "Parameters": []
+  },
+  "Undo": {
+    "Commands": [
+      "PixiEditor.Undo.Undo"
+    ],
+    "DefaultShortcut": {
+      "key": "Z",
+      "modifiers": [
+        "Ctrl"
+      ]
+    },
+    "Parameters": []
+  },
+  "ShowGrid": {
+    "Commands": [
+      "PixiEditor.View.ToggleGrid"
+    ],
+    "DefaultShortcut": {
+      "key": "'",
+      "modifiers": [
+        "Ctrl"
+      ]
+    },
+    "Parameters": []
+  },
+  "Zoom.action=in": {
+    "Commands": [
+      "PixiEditor.View.ZoomIn"
+    ],
+    "DefaultShortcut": {
+      "key": "+",
+      "modifiers": [
+        "Ctrl"
+      ]
+    },
+    "Parameters": []
+  },
+  "Zoom.action=out": {
+    "Commands": [
+      "PixiEditor.View.Zoomout"
+    ],
+    "DefaultShortcut": {
+      "key": "-",
+      "modifiers": [
+        "Ctrl"
+      ]
+    },
+    "Parameters": []
+  },
+  "Options": {
+    "Commands": [
+      "PixiEditor.Window.OpenSettingsWindow"
+    ],
+    "DefaultShortcut": {
+      "key": "K",
+      "modifiers": [
+        "Ctrl"
+      ]
+    },
+    "Parameters": []
+  },
+  "Home": {
+    "Commands": [
+      "PixiEditor.Window.OpenStartupWindow"
+    ],
+    "DefaultShortcut": {
+      "key": "None",
+      "modifiers": null
+    },
+    "Parameters": []
+  },
+  "KeyboardShortcuts": {
+    "Commands": [
+      "PixiEditor.Window.OpenShortcutWindow"
+    ],
+    "DefaultShortcut": {
+      "key": "F7",
+      "modifiers": [
+        "Ctrl",
+        "Alt",
+        "Shift"
+      ]
+    },
+    "Parameters": []
+  },
+  "About": {
+    "Commands": [
+      "PixiEditor.Window.OpenAboutWindow"
+    ],
+    "DefaultShortcut": {
+      "key": "None",
+      "modifiers": null
+    },
+    "Parameters": []
+  },
+  "TogglePreview": {
+    "Commands": [
+      "PixiEditor.Window.OpenPreviewWindow"
+    ],
+    "DefaultShortcut": {
+      "key": "F7",
+      "modifiers": null
+    },
+    "Parameters": []
+  },
+  "SymmetryMode.orientation=vertical": {
+    "Commands": [
+      "PixiEditor.Document.ToggleVerticalSymmetryAxis"
+    ],
+    "DefaultShortcut": {
+      "key": "None",
+      "modifiers": null
+    },
+    "Parameters": []
+  },
+  "SymmetryMode.orientation=horizontal": {
+    "Commands": [
+      "PixiEditor.Document.ToggleHorizontalSymmetryAxis"
+    ],
+    "DefaultShortcut": {
+      "key": "None",
+      "modifiers": null
+    },
+    "Parameters": []
+  },
+  "Clear": {
+    "Commands": [
+      "PixiEditor.Document.DeleteSelected",
+      "PixiEditor.Layer.DeleteAllSelected"
+    ],
+    "DefaultShortcut": {
+      "key": "Delete",
+      "modifiers": null
+    },
+    "Parameters": []
+  },
+  "SpriteSize": {
+    "Commands": [
+      "PixiEditor.Document.ResizeDocument"
+    ],
+    "DefaultShortcut": {
+      "key": "I",
+      "modifiers": [
+        "Ctrl",
+        "Alt"
+      ]
+    },
+    "Parameters": []
+  },
+  "CanvasSize": {
+    "Commands": [
+      "PixiEditor.Document.ResizeCanvas"
+    ],
+    "DefaultShortcut": {
+      "key": "C",
+      "modifiers": null
+    },
+    "Parameters": []
+  },
+  "eyedropper": {
+    "Commands": [
+      "PixiEditor.Tools.Select.ColorPickerToolViewModel"
+    ],
+    "DefaultShortcut": {
+      "key": "I",
+      "modifiers": null
+    },
+    "Parameters": []
+  },
+  "ellipse": {
+    "Commands": [
+      "PixiEditor.Tools.Select.RasterEllipseToolViewModel"
+    ],
+    "DefaultShortcut": {
+      "key": "U",
+      "modifiers": [
+        "Shift"
+      ]
+    },
+    "Parameters": []
+  },
+  "eraser": {
+    "Commands": [
+      "PixiEditor.Tools.Select.EraserToolViewModel"
+    ],
+    "DefaultShortcut": {
+      "key": "E",
+      "modifiers": null
+    },
+    "Parameters": []
+  },
+  "paint_bucket": {
+    "Commands": [
+      "PixiEditor.Tools.Select.FloodFillToolViewModel"
+    ],
+    "DefaultShortcut": {
+      "key": "G",
+      "modifiers": null
+    },
+    "Parameters": []
+  },
+  "lasso": {
+    "Commands": [
+      "PixiEditor.Tools.Select.LassoToolViewModel"
+    ],
+    "DefaultShortcut": {
+      "key": "Q",
+      "modifiers": null
+    },
+    "Parameters": []
+  },
+  "line": {
+    "Commands": [
+      "PixiEditor.Tools.Select.RasterLineToolViewModel"
+    ],
+    "DefaultShortcut": {
+      "key": "L",
+      "modifiers": null
+    },
+    "Parameters": []
+  },
+  "magic_wand": {
+    "Commands": [
+      "PixiEditor.Tools.Select.MagicWandToolViewModel"
+    ],
+    "DefaultShortcut": {
+      "key": "W",
+      "modifiers": null
+    },
+    "Parameters": []
+  },
+  "move": {
+    "Commands": [
+      "PixiEditor.Tools.Select.MoveToolViewModel"
+    ],
+    "DefaultShortcut": {
+      "key": "V",
+      "modifiers": null
+    },
+    "Parameters": []
+  },
+  "hand": {
+    "Commands": [
+      "PixiEditor.Tools.Select.MoveViewportToolViewModel"
+    ],
+    "DefaultShortcut": {
+      "key": "H",
+      "modifiers": null
+    },
+    "Parameters": []
+  },
+  "pencil": {
+    "Commands": [
+      "PixiEditor.Tools.Select.PenToolViewModel"
+    ],
+    "DefaultShortcut": {
+      "key": "B",
+      "modifiers": null
+    },
+    "Parameters": []
+  },
+  "rectangle": {
+    "Commands": [
+      "PixiEditor.Tools.Select.RasterRectangleToolViewModel"
+    ],
+    "DefaultShortcut": {
+      "key": "U",
+      "modifiers": null
+    },
+    "Parameters": []
+  },
+  "rectangular_marquee": {
+    "Commands": [
+      "PixiEditor.Tools.Select.SelectToolViewModel"
+    ],
+    "DefaultShortcut": {
+      "key": "M",
+      "modifiers": null
+    },
+    "Parameters": []
+  },
+  "zoom": {
+    "Commands": [
+      "PixiEditor.Tools.Select.ZoomToolViewModel"
+    ],
+    "DefaultShortcut": {
+      "key": "Z",
+      "modifiers": null
+    },
+    "Parameters": []
+  },
+  "NewFrame": {
+    "Commands": [
+      "PixiEditor.Animation.DuplicateCel"
+    ],
+    "DefaultShortcut": {
+      "key": "N",
+      "modifiers": [
+        "Alt"
+      ]
+    },
+    "Parameters": []
+  },
+  "NewFrame.content=empty": {
+    "Commands": [
+      "PixiEditor.Animation.CreateCel"
+    ],
+    "DefaultShortcut": {
+      "key": "B",
+      "modifiers": [
+        "Alt"
+      ]
+    },
+    "Parameters": []
+  },
+  "RemoveFrame": {
+    "Commands": [
+      "PixiEditor.Animation.DuplicateCel"
+    ],
+    "DefaultShortcut": {
+      "key": "C",
+      "modifiers": [
+        "Alt"
+      ]
+    },
+    "Parameters": []
+  },
+  "AutocropSprite": {
+    "Commands": [
+      "PixiEditor.Document.ClipCanvas"
+    ],
+    "DefaultShortcut": {
+      "key": "None",
+      "modifiers": null
+    },
+    "Parameters": []
+  },
+  "Flip.orientation=horizontal.target=mask": {
+    "Commands": [
+      "PixiEditor.Document.FlipImageHorizontal"
+    ],
+    "DefaultShortcut": {
+      "key": "H",
+      "modifiers": [
+        "Shift"
+      ]
+    },
+    "Parameters": []
+  },
+  "Flip.orientation=vertical.target=mask": {
+    "Commands": [
+      "PixiEditor.Document.FlipImageVertical"
+    ],
+    "DefaultShortcut": {
+      "key": "V",
+      "modifiers": [
+        "Shift"
+      ]
+    },
+    "Parameters": []
+  },
+  "AdvancedMode": {
+    "Commands": [
+      "PixiEditor.Viewport.ToggleHud"
+    ],
+    "DefaultShortcut": {
+      "key": "F",
+      "modifiers": [
+        "Ctrl"
+      ]
+    },
+    "Parameters": []
+  }
+}

+ 31 - 9
src/PixiEditor/Models/Commands/CommandController.cs

@@ -77,7 +77,7 @@ internal class CommandController
             {
                 if (Commands.ContainsKey(command))
                 {
-                    ReplaceShortcut(Commands[command], shortcut.KeyCombination);
+                    ReplaceShortcut(Commands[command], shortcut.KeyCombination, false);
                 }
             }
         }
@@ -178,7 +178,8 @@ internal class CommandController
     {
         foreach (var evaluator in objectsToInvokeOn)
         {
-            if (evaluator.Methods.CanExecuteEvaluator.DependentOn != null && evaluator.Methods.CanExecuteEvaluator.DependentOn.Contains(propertyName))
+            if (evaluator.Methods.CanExecuteEvaluator.DependentOn != null &&
+                evaluator.Methods.CanExecuteEvaluator.DependentOn.Contains(propertyName))
             {
                 evaluator.OnCanExecuteChanged();
             }
@@ -258,7 +259,8 @@ internal class CommandController
                 var customOsShortcuts = methodInfo.GetCustomAttributes<CustomOsShortcutAttribute>();
 
                 CustomOsShortcutAttribute? customOsShortcut =
-                    customOsShortcuts.FirstOrDefault(x => string.Equals(x.ValidOs, IOperatingSystem.Current.Name, StringComparison.InvariantCultureIgnoreCase));
+                    customOsShortcuts.FirstOrDefault(x => string.Equals(x.ValidOs, IOperatingSystem.Current.Name,
+                        StringComparison.InvariantCultureIgnoreCase));
 
                 foreach (var attribute in commandAttrs)
                 {
@@ -313,7 +315,7 @@ internal class CommandController
                         var validCustomShortcut = customOsShortcut?.TargetCommand == menu.InternalName
                             ? customOsShortcut
                             : null;
-                        
+
                         ISearchHandler searchHandler = serviceProvider.GetRequiredService<ISearchHandler>();
 
                         if (searchHandler is null)
@@ -329,7 +331,8 @@ internal class CommandController
                                 Description = menu.DisplayName,
                                 IconEvaluator = IconEvaluator.Default,
                                 DefaultShortcut = AdjustForOS(menu.GetShortcut(), validCustomShortcut),
-                                Shortcut = GetShortcut(name, AdjustForOS(attribute.GetShortcut(), validCustomShortcut), template)
+                                Shortcut = GetShortcut(name, AdjustForOS(attribute.GetShortcut(), validCustomShortcut),
+                                    template)
                             };
 
                         Commands.Add(command);
@@ -602,7 +605,8 @@ internal class CommandController
                                     CanExecuteEvaluators,
                                     evaluateFunction => new CanExecuteEvaluator()
                                     {
-                                        Name = attribute.Name, Evaluate = evaluateFunction.Invoke,
+                                        Name = attribute.Name,
+                                        Evaluate = evaluateFunction.Invoke,
                                         DependentOn = canExecuteAttribute.DependentOn
                                     });
                                 break;
@@ -644,14 +648,32 @@ internal class CommandController
     /// <summary>
     /// Deletes all shortcuts of <paramref name="newShortcut"/> and adds <paramref name="command"/>
     /// </summary>
-    public void ReplaceShortcut(Command command, KeyCombination newShortcut)
+    public void ReplaceShortcut(Command command, KeyCombination newShortcut, bool clear = true)
     {
+        List<Command> toRemove = new List<Command>();
         foreach (Command other in Commands[newShortcut])
         {
-            other.Shortcut = KeyCombination.None;
+            bool anyContextOverlap = (other.ShortcutContexts != null && other.ShortcutContexts
+                                         .Any(x => command.ShortcutContexts != null &&
+                                                   command.ShortcutContexts.Contains(x)))
+                                     || other.ShortcutContexts == null && command.ShortcutContexts == null;
+            if (anyContextOverlap && newShortcut == other.Shortcut && other.Shortcut != KeyCombination.None)
+            {
+                toRemove.Add(other);
+            }
+        }
+
+        if (clear)
+        {
+            Commands.ClearShortcut(newShortcut);
+        }
+
+        foreach (var cmd in toRemove)
+        {
+            Commands.RemoveShortcut(cmd, cmd.Shortcut);
+            cmd.Shortcut = KeyCombination.None;
         }
 
-        Commands.ClearShortcut(newShortcut);
         Commands.RemoveShortcut(command, command.Shortcut);
         Commands.AddShortcut(command, newShortcut);
         command.Shortcut = newShortcut;

+ 6 - 1
src/PixiEditor/Models/Commands/ShortcutsTemplate.cs

@@ -1,4 +1,5 @@
 using System.Collections.Generic;
+using System.Diagnostics;
 using Avalonia.Input;
 using PixiEditor.Models.Commands.Templates.Providers.Parsers;
 using PixiEditor.Models.Input;
@@ -20,7 +21,10 @@ public sealed class ShortcutsTemplate
         ShortcutsTemplate template = new ShortcutsTemplate();
         foreach (KeyDefinition keyDefinition in keyDefinitions)
         {
-            template.Shortcuts.Add(new Shortcut(keyDefinition.DefaultShortcut.ToKeyCombination(), keyDefinition.Command));
+            foreach (string command in keyDefinition.Commands)
+            {
+                template.Shortcuts.Add(new Shortcut(keyDefinition.DefaultShortcut.ToKeyCombination(), command));
+            }
         }
 
         return template;
@@ -28,6 +32,7 @@ public sealed class ShortcutsTemplate
 }
 
 [Serializable]
+[DebuggerDisplay("KeyCombination = {KeyCombination}, Commands = {Commands}")]
 public sealed class Shortcut
 {
     public KeyCombination KeyCombination { get; set; }

+ 61 - 51
src/PixiEditor/Models/Commands/Templates/Providers/Parsers/AsepriteKeysParser.cs

@@ -38,9 +38,10 @@ public class AsepriteKeysParser : KeysParser
 
         if (Path.GetExtension(path) != ".aseprite-keys")
         {
-            throw new InvalidFileTypeException("FILE_FORMAT_NOT_ASEPRITE_KEYS", $"File {path} is not an aseprite-keys file");
+            throw new InvalidFileTypeException("FILE_FORMAT_NOT_ASEPRITE_KEYS",
+                $"File {path} is not an aseprite-keys file");
         }
-        
+
         return LoadAndParse(path, applyDefaults);
     }
 
@@ -60,7 +61,7 @@ public class AsepriteKeysParser : KeysParser
         {
             throw new RecoverableException("FAILED_TO_OPEN_FILE", e);
         }
-        
+
         List<KeyDefinition> keyDefinitions = new List<KeyDefinition>(); // DefaultShortcut is actually mapped shortcut.
 
         LoadCommands(doc, keyDefinitions, applyDefaults);
@@ -87,57 +88,60 @@ public class AsepriteKeysParser : KeysParser
 
         foreach (XmlNode commandNode in commands)
         {
-            if(commandNode.Attributes == null) continue;
-            
+            if (commandNode.Attributes == null) continue;
+
             XmlAttribute command = commandNode.Attributes["command"];
             XmlAttribute shortcut = commandNode.Attributes["shortcut"];
             XmlNodeList paramNodes = commandNode.SelectNodes("param");
 
-            if(command == null || shortcut == null) continue;
+            if (command == null || shortcut == null) continue;
 
             string commandName = $"{command.Value}{GetParamString(paramNodes)}";
             string shortcutValue = shortcut.Value;
-            
+
             if (!Map.ContainsKey(commandName))
             {
                 continue;
             }
 
             var mappedEntry = Map[commandName];
-            commandName = mappedEntry.Command;
-            
-            HumanReadableKeyCombination combination;
-            
-            XmlAttribute removed = commandNode.Attributes["removed"];
-            if (removed is { Value: "true" })
-            {
-                combination = new HumanReadableKeyCombination("None");
-            }
-            else
+            foreach (var mappedCommand in mappedEntry.Commands)
             {
-                combination = HumanReadableKeyCombination.FromStringCombination(shortcutValue);
-            }
+                commandName = mappedCommand;
+
+                HumanReadableKeyCombination combination;
+
+                XmlAttribute removed = commandNode.Attributes["removed"];
+                if (removed is { Value: "true" })
+                {
+                    combination = new HumanReadableKeyCombination("None");
+                }
+                else
+                {
+                    combination = HumanReadableKeyCombination.FromStringCombination(shortcutValue);
+                }
 
-            // We should override existing entry, because aseprite-keys file can contain multiple entries for the same command.
-            // Last one is the one that should be used.
-            keyDefinitions.RemoveAll(x => x.Command == commandName);
-            
-            keyDefinitions.Add(new KeyDefinition(commandName, combination));
+                // We should override existing entry, because aseprite-keys file can contain multiple entries for the same command.
+                // Last one is the one that should be used.
+                keyDefinitions.RemoveAll(x => x.Commands.Contains(commandName));
+
+                keyDefinitions.Add(new KeyDefinition(new[] { commandName }, combination));
+            }
         }
     }
 
     private string GetParamString(XmlNodeList paramNodes)
     {
-        if(paramNodes == null || paramNodes.Count == 0) return string.Empty;
-        
+        if (paramNodes == null || paramNodes.Count == 0) return string.Empty;
+
         StringBuilder builder = new StringBuilder();
         foreach (XmlNode paramNode in paramNodes)
         {
-            if(paramNode.Attributes == null) continue;
-            
+            if (paramNode.Attributes == null) continue;
+
             XmlAttribute paramName = paramNode.Attributes["name"];
             XmlAttribute paramValue = paramNode.Attributes["value"];
-            if(paramName == null || paramValue == null) continue;
+            if (paramName == null || paramValue == null) continue;
 
             builder.Append('.');
             builder.Append(paramName.Value);
@@ -163,12 +167,12 @@ public class AsepriteKeysParser : KeysParser
 
         foreach (XmlNode tool in tools)
         {
-            if(tool.Attributes == null) continue;
-            
+            if (tool.Attributes == null) continue;
+
             XmlAttribute command = tool.Attributes["tool"];
             XmlAttribute shortcut = tool.Attributes["shortcut"];
 
-            if(command == null || shortcut == null) continue;
+            if (command == null || shortcut == null) continue;
 
             string commandName = command.Value;
             string shortcutValue = shortcut.Value;
@@ -179,25 +183,28 @@ public class AsepriteKeysParser : KeysParser
             }
 
             var mappedEntry = Map[commandName];
-            commandName = mappedEntry.Command;
-
-            HumanReadableKeyCombination combination;
-            
-            XmlAttribute removed = tool.Attributes["removed"];
-            if (removed is { Value: "true" })
-            {
-                combination = new HumanReadableKeyCombination("None");
-            }
-            else
+            foreach (var mappedCommand in mappedEntry.Commands)
             {
-                combination = HumanReadableKeyCombination.FromStringCombination(shortcutValue);
-            }
+                commandName = mappedCommand;
+
+                HumanReadableKeyCombination combination;
+
+                XmlAttribute removed = tool.Attributes["removed"];
+                if (removed is { Value: "true" })
+                {
+                    combination = new HumanReadableKeyCombination("None");
+                }
+                else
+                {
+                    combination = HumanReadableKeyCombination.FromStringCombination(shortcutValue);
+                }
 
-            // We should override existing entry, because aseprite-keys file can contain multiple entries for the same tool.
-            // Last one is the one that should be used.
-            keyDefinitions.RemoveAll(x => x.Command == commandName);
-            
-            keyDefinitions.Add(new KeyDefinition(commandName, combination));
+                // We should override existing entry, because aseprite-keys file can contain multiple entries for the same tool.
+                // Last one is the one that should be used.
+                keyDefinitions.RemoveAll(x => x.Commands.Contains(commandName));
+
+                keyDefinitions.Add(new KeyDefinition(new[] { commandName }, combination));
+            }
         }
     }
 
@@ -205,9 +212,12 @@ public class AsepriteKeysParser : KeysParser
     {
         foreach (var mapEntry in Map)
         {
-            if (mapEntry.Value.Command.StartsWith(commandGroup))
+            foreach (var command in mapEntry.Value.Commands)
             {
-                keyDefinitions.Add(mapEntry.Value);
+                if (command.StartsWith(commandGroup))
+                {
+                    keyDefinitions.Add(mapEntry.Value);
+                }
             }
         }
     }

+ 3 - 3
src/PixiEditor/Models/Commands/Templates/Providers/Parsers/KeyDefinition.cs

@@ -6,14 +6,14 @@ namespace PixiEditor.Models.Commands.Templates.Providers.Parsers;
 [Serializable]
 public class KeyDefinition
 {
-    public string Command { get; set; }
+    public string[] Commands { get; set; }
     public HumanReadableKeyCombination DefaultShortcut { get; set; }
     public string[] Parameters { get; set; }
     
     public KeyDefinition() { }
-    public KeyDefinition(string command, HumanReadableKeyCombination defaultShortcut, params string[] parameters)
+    public KeyDefinition(string[] commands, HumanReadableKeyCombination defaultShortcut, params string[] parameters)
     {
-        Command = command;
+        Commands = commands;
         DefaultShortcut = defaultShortcut;
         Parameters = parameters;
     }

+ 11 - 8
src/PixiEditor/Models/Commands/Templates/Providers/Parsers/KeysParser.cs

@@ -14,10 +14,10 @@ public abstract class KeysParser
 
     public Dictionary<string, KeyDefinition> Map => _cachedMap ??= LoadKeysMap();
     private Dictionary<string, KeyDefinition> _cachedMap;
-    
+
     public List<Shortcut> Defaults => _cachedDefaults ??= ParseDefaults();
     private List<Shortcut> _cachedDefaults;
-    
+
     public KeysParser(string mapFileName)
     {
         if (mapFileName.StartsWith("avares://"))
@@ -28,7 +28,7 @@ public abstract class KeysParser
         {
             SetPathOrThrow(mapFileName);
         }
-        
+
         MapFileName = mapFileName;
     }
 
@@ -57,13 +57,13 @@ public abstract class KeysParser
     /// <param name="applyTemplateDefaults">If true, all shortcuts available in the key map will be loaded, and then overwritten by entries in the file. If false, only entries from the file will be applied.</param>
     /// <returns>Parsed ShortcutTemplate.</returns>
     public abstract ShortcutsTemplate Parse(string filePath, bool applyTemplateDefaults);
-    
+
     private Dictionary<string, KeyDefinition> LoadKeysMap()
     {
         string text = ReadMap();
         var dict = JsonConvert.DeserializeObject<Dictionary<string, KeyDefinition>>(text);
-        if(dict == null) throw new Exception("Keys map file is empty.");
-        if(dict.ContainsKey("")) dict.Remove("");
+        if (dict == null) throw new Exception("Keys map file is empty.");
+        if (dict.ContainsKey("")) dict.Remove("");
         return dict;
     }
 
@@ -86,10 +86,13 @@ public abstract class KeysParser
         {
             if (value.DefaultShortcut != null)
             {
-                defaults.Add(new Shortcut(value.DefaultShortcut.ToKeyCombination(), Map[key].Command));
+                foreach (var keyCommand in Map[key].Commands)
+                {
+                    defaults.Add(new Shortcut(value.DefaultShortcut.ToKeyCombination(), keyCommand));
+                }
             }
         }
-        
+
         return defaults;
     }
 }

+ 8 - 7
src/PixiEditor/ViewModels/SubViewModels/DebugViewModel.cs

@@ -206,7 +206,7 @@ internal class DebugViewModel : SubViewModel<ViewModelMain>
                     if (command.IsDebug)
                         continue;
                     keyDefinitions.Add($"(provider).{command.InternalName}",
-                        new KeyDefinition(command.InternalName, new HumanReadableKeyCombination("None"),
+                        new KeyDefinition([command.InternalName], new HumanReadableKeyCombination("None"),
                             Array.Empty<string>()));
                 }
 
@@ -252,9 +252,12 @@ internal class DebugViewModel : SubViewModel<ViewModelMain>
 
                 foreach (var keyDefinition in keyDefinitions)
                 {
-                    if (!Owner.CommandController.Commands.ContainsKey(keyDefinition.Value.Command))
+                    foreach (var command in keyDefinition.Value.Commands)
                     {
-                        unknownCommands++;
+                        if (!Owner.CommandController.Commands.ContainsKey(command))
+                        {
+                            unknownCommands++;
+                        }
                     }
                 }
 
@@ -461,10 +464,8 @@ internal class DebugViewModel : SubViewModel<ViewModelMain>
         if (File.Exists(file))
         {
             OptionsDialog<string> dialog =
-                new("ARE_YOU_SURE", $"Are you sure you want to overwrite {path}\n(Full Path: {file})", MainWindow.Current)
-                {
-                    { "Yes", x => File.Delete(file) }, "Cancel"
-                };
+                new("ARE_YOU_SURE", $"Are you sure you want to overwrite {path}\n(Full Path: {file})",
+                    MainWindow.Current) { { "Yes", x => File.Delete(file) }, "Cancel" };
 
             dialog.ShowDialog();
         }