@@ -61,8 +61,8 @@ pub fn default_mapping() -> Mapping {
6161 // TransformLayerMessage
6262 entry!( KeyDown ( Enter ) ; action_dispatch=TransformLayerMessage :: ApplyTransformOperation ) ,
6363 entry!( KeyDown ( Lmb ) ; action_dispatch=TransformLayerMessage :: ApplyTransformOperation ) ,
64- entry!( KeyDown ( Escape ) ; action_dispatch=TransformLayerMessage :: CancelTransformOperation ) ,
6564 entry!( KeyDown ( Rmb ) ; action_dispatch=TransformLayerMessage :: CancelTransformOperation ) ,
65+ entry!( KeyDown ( Escape ) ; action_dispatch=TransformLayerMessage :: CancelTransformOperation ) ,
6666 entry!( KeyDown ( KeyX ) ; action_dispatch=TransformLayerMessage :: ConstrainX ) ,
6767 entry!( KeyDown ( KeyY ) ; action_dispatch=TransformLayerMessage :: ConstrainY ) ,
6868 entry!( KeyDown ( Backspace ) ; action_dispatch=TransformLayerMessage :: TypeBackspace ) ,
@@ -110,6 +110,8 @@ pub fn default_mapping() -> Mapping {
110110 entry!( KeyDown ( ArrowRight ) ; modifiers=[ ArrowUp ] , action_dispatch=ArtboardToolMessage :: NudgeSelected { delta_x: NUDGE_AMOUNT , delta_y: -NUDGE_AMOUNT } ) ,
111111 entry!( KeyDown ( ArrowRight ) ; modifiers=[ ArrowDown ] , action_dispatch=ArtboardToolMessage :: NudgeSelected { delta_x: NUDGE_AMOUNT , delta_y: NUDGE_AMOUNT } ) ,
112112 entry!( KeyDown ( ArrowRight ) ; action_dispatch=ArtboardToolMessage :: NudgeSelected { delta_x: NUDGE_AMOUNT , delta_y: 0. } ) ,
113+ entry!( KeyDown ( Rmb ) ; action_dispatch=ArtboardToolMessage :: Abort ) ,
114+ entry!( KeyDown ( Escape ) ; action_dispatch=ArtboardToolMessage :: Abort ) ,
113115 //
114116 // NavigateToolMessage
115117 entry!( KeyUp ( Lmb ) ; modifiers=[ Shift ] , action_dispatch=NavigateToolMessage :: ClickZoom { zoom_in: false } ) ,
@@ -142,6 +144,8 @@ pub fn default_mapping() -> Mapping {
142144 entry!( DoubleClick ( MouseButton :: Left ) ; action_dispatch=GradientToolMessage :: InsertStop ) ,
143145 entry!( KeyDown ( Delete ) ; action_dispatch=GradientToolMessage :: DeleteStop ) ,
144146 entry!( KeyDown ( Backspace ) ; action_dispatch=GradientToolMessage :: DeleteStop ) ,
147+ entry!( KeyDown ( Rmb ) ; action_dispatch=GradientToolMessage :: Abort ) ,
148+ entry!( KeyDown ( Escape ) ; action_dispatch=GradientToolMessage :: Abort ) ,
145149 //
146150 // RectangleToolMessage
147151 entry!( KeyDown ( Lmb ) ; action_dispatch=RectangleToolMessage :: DragStart ) ,
@@ -235,6 +239,8 @@ pub fn default_mapping() -> Mapping {
235239 entry!( PointerMove ; action_dispatch=FreehandToolMessage :: PointerMove ) ,
236240 entry!( KeyDown ( Lmb ) ; action_dispatch=FreehandToolMessage :: DragStart ) ,
237241 entry!( KeyUp ( Lmb ) ; action_dispatch=FreehandToolMessage :: DragStop ) ,
242+ entry!( KeyDown ( Rmb ) ; action_dispatch=FreehandToolMessage :: Abort ) ,
243+ entry!( KeyDown ( Escape ) ; action_dispatch=FreehandToolMessage :: Abort ) ,
238244 //
239245 // SplineToolMessage
240246 entry!( PointerMove ; action_dispatch=SplineToolMessage :: PointerMove ) ,
@@ -254,6 +260,8 @@ pub fn default_mapping() -> Mapping {
254260 entry!( KeyUp ( Lmb ) ; action_dispatch=BrushToolMessage :: DragStop ) ,
255261 entry!( KeyDown ( BracketLeft ) ; action_dispatch=BrushToolMessage :: UpdateOptions ( BrushToolMessageOptionsUpdate :: ChangeDiameter ( -BRUSH_SIZE_CHANGE_KEYBOARD ) ) ) ,
256262 entry!( KeyDown ( BracketRight ) ; action_dispatch=BrushToolMessage :: UpdateOptions ( BrushToolMessageOptionsUpdate :: ChangeDiameter ( BRUSH_SIZE_CHANGE_KEYBOARD ) ) ) ,
263+ entry!( KeyDown ( Rmb ) ; action_dispatch=BrushToolMessage :: Abort ) ,
264+ entry!( KeyDown ( Escape ) ; action_dispatch=BrushToolMessage :: Abort ) ,
257265 //
258266 // ToolMessage
259267 entry!( KeyDown ( KeyV ) ; action_dispatch=ToolMessage :: ActivateToolSelect ) ,
@@ -346,7 +354,8 @@ pub fn default_mapping() -> Mapping {
346354 entry!( KeyUp ( Mmb ) ; action_dispatch=NavigationMessage :: TransformCanvasEnd { abort_transform: false } ) ,
347355 entry!( KeyDown ( Lmb ) ; modifiers=[ Space ] , action_dispatch=NavigationMessage :: TranslateCanvasBegin ) ,
348356 entry!( KeyUp ( Lmb ) ; action_dispatch=NavigationMessage :: TransformCanvasEnd { abort_transform: false } ) ,
349- entry!( KeyUp ( Rmb ) ; action_dispatch=NavigationMessage :: TransformCanvasEnd { abort_transform: true } ) ,
357+ entry!( KeyDown ( Rmb ) ; action_dispatch=NavigationMessage :: TransformCanvasEnd { abort_transform: true } ) ,
358+ entry!( KeyDown ( Escape ) ; action_dispatch=NavigationMessage :: TransformCanvasEnd { abort_transform: true } ) ,
350359 entry!( KeyDown ( NumpadAdd ) ; modifiers=[ Accel ] , action_dispatch=NavigationMessage :: IncreaseCanvasZoom { center_on_mouse: false } ) ,
351360 entry!( KeyDown ( Equal ) ; modifiers=[ Accel ] , action_dispatch=NavigationMessage :: IncreaseCanvasZoom { center_on_mouse: false } ) ,
352361 entry!( KeyDown ( Minus ) ; modifiers=[ Accel ] , action_dispatch=NavigationMessage :: DecreaseCanvasZoom { center_on_mouse: false } ) ,
0 commit comments