From c02cda6b10838e7d067f2407f5efd46f7aed0521 Mon Sep 17 00:00:00 2001 From: OverloadedOrama <35376950+OverloadedOrama@users.noreply.github.com> Date: Sat, 16 May 2020 19:59:02 +0300 Subject: [PATCH] Made tool keyboard shortcuts fire on action release --- src/Main.gd | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/Main.gd b/src/Main.gd index 233bc47cb..1d56d762d 100644 --- a/src/Main.gd +++ b/src/Main.gd @@ -235,9 +235,9 @@ func _input(event : InputEvent) -> void: if event.is_action_pressed("undo") or event.is_action_pressed("redo") or event.is_action_pressed("redo_secondary"): return for t in tools: # Handle tool shortcuts - if event.is_action_pressed(t[2]): # Shortcut for right button (with Alt) + if event.is_action_released(t[2]): # Shortcut for right button (with Alt) _on_Tool_pressed(t[0], false, false) - elif event.is_action_pressed(t[1]): # Shortcut for left button + elif event.is_action_released(t[1]): # Shortcut for left button _on_Tool_pressed(t[0], false, true)