From 7c0de64b920e8846085b4775fb53650b7c9d82be Mon Sep 17 00:00:00 2001 From: Emmanouil Papadeas Date: Mon, 6 Nov 2023 02:34:53 +0200 Subject: [PATCH] Fix tool shortcuts not working with Control Addresses #935 --- src/UI/Tools/ToolButtons.gd | 10 ++-------- 1 file changed, 2 insertions(+), 8 deletions(-) diff --git a/src/UI/Tools/ToolButtons.gd b/src/UI/Tools/ToolButtons.gd index f45a9c1c3..1ce14e810 100644 --- a/src/UI/Tools/ToolButtons.gd +++ b/src/UI/Tools/ToolButtons.gd @@ -15,18 +15,12 @@ func _input(event: InputEvent) -> void: continue var t: Tools.Tool = Tools.tools[tool_name] if InputMap.has_action("right_" + t.shortcut + "_tool"): - if ( - event.is_action_pressed("right_" + t.shortcut + "_tool") - and (!event.control and !event.command) - ): + if event.is_action_pressed("right_" + t.shortcut + "_tool", false, true): # Shortcut for right button (with Alt) Tools.assign_tool(t.name, BUTTON_RIGHT) return if InputMap.has_action("left_" + t.shortcut + "_tool"): - if ( - event.is_action_pressed("left_" + t.shortcut + "_tool") - and (!event.control and !event.command) - ): + if event.is_action_pressed("left_" + t.shortcut + "_tool", false, true): # Shortcut for left button Tools.assign_tool(t.name, BUTTON_LEFT) return