Browse Source

Brought back key shortcuts

Frytek 5 years ago
parent
commit
798ff1bf80
2 changed files with 42 additions and 2 deletions
  1. 2 2
      PixiEditor/Properties/AssemblyInfo.cs
  2. 40 0
      PixiEditor/Views/MainWindow.xaml

+ 2 - 2
PixiEditor/Properties/AssemblyInfo.cs

@@ -51,5 +51,5 @@ using System.Windows;
 // You can specify all the values or you can default the Build and Revision Numbers
 // by using the '*' as shown below:
 // [assembly: AssemblyVersion("1.0.*")]
-[assembly: AssemblyVersion("1.0.0.0")]
-[assembly: AssemblyFileVersion("1.0.0.0")]
+[assembly: AssemblyVersion("0.0.3.0")]
+[assembly: AssemblyFileVersion("0.0.3.0")]

+ 40 - 0
PixiEditor/Views/MainWindow.xaml

@@ -37,6 +37,14 @@
             Modifiers="Ctrl"
             Key="Y"
             Command="{Binding RedoCommand}"/>
+        <KeyBinding
+            Modifiers="Ctrl"
+            Key="Z"
+            Command="{Binding UndoCommand}"/>
+        <KeyBinding 
+            Modifiers="Ctrl"
+            Key="Y"
+            Command="{Binding RedoCommand}"/>
 
 
     </Window.InputBindings>
@@ -83,6 +91,38 @@
         <Grid Grid.Column="1" Grid.Row="1" Background="#303030" Margin="0,5,5,0">
             <Grid>
                 <vws:MainDrawingPanel CenterOnStart="True">
+                    <vws:MainDrawingPanel.InputBindings>
+                        <KeyBinding            
+            Key="B"
+            Command="{Binding SelectToolCommand}"
+            CommandParameter="Pen"/>
+                        <KeyBinding
+            Key="G"
+            Command="{Binding SelectToolCommand}"
+            CommandParameter="Bucket"/>
+                        <KeyBinding
+            Key="L"
+            Command="{Binding SelectToolCommand}"
+            CommandParameter="Line"/>
+                        <KeyBinding
+            Key="C"
+            Command="{Binding SelectToolCommand}"
+            CommandParameter="Circle"/>
+                        <KeyBinding Key="R"
+                    Command="{Binding SelectToolCommand}"
+                    CommandParameter="Rectangle"/>
+                        <KeyBinding Key="O"
+                    Command="{Binding SelectToolCommand}"
+                    CommandParameter="ColorPicker"/>
+                        <KeyBinding Key="E"
+                    Command="{Binding SelectToolCommand}"
+                    CommandParameter="Earser"/>
+                        <KeyBinding Key="U"
+                    Command="{Binding SelectToolCommand}"
+                    CommandParameter="Lighten"/>
+                        <KeyBinding Key="O" Modifiers="Ctrl"
+                    Command="{Binding OpenFileCommand}"/>
+                    </vws:MainDrawingPanel.InputBindings>
                     <vws:MainDrawingPanel.Item>
                         <Canvas Width="{Binding BitmapUtility.ActiveLayer.Width}" Height="{Binding BitmapUtility.ActiveLayer.Height}" VerticalAlignment="Center" HorizontalAlignment="Center">
                             <i:Interaction.Triggers>