From f8c74948b3624400cb729853182482df0fc81fd0 Mon Sep 17 00:00:00 2001 From: Emmanouil Papadeas Date: Thu, 7 Jul 2022 15:54:39 +0300 Subject: [PATCH] [Keychain] Fix issue with menu events being triggered by actions that are not exact matches --- addons/keychain/Keychain.gd | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/addons/keychain/Keychain.gd b/addons/keychain/Keychain.gd index e934d6e7c..c7e3777e9 100644 --- a/addons/keychain/Keychain.gd +++ b/addons/keychain/Keychain.gd @@ -83,7 +83,7 @@ class MenuInputAction: func handle_input(event: InputEvent, action: String) -> bool: if not node: return false - if event.is_action_pressed(action): + if event.is_action_pressed(action, false, true): if event is InputEventKey: var acc: int = node.get_item_accelerator(menu_item_id) # If the event is the same as the menu item's accelerator, skip @@ -91,7 +91,7 @@ class MenuInputAction: return true node.emit_signal("id_pressed", menu_item_id) return true - if event.is_action(action) and echo: + if event.is_action(action, true) and echo: if event.is_echo(): node.emit_signal("id_pressed", menu_item_id) return true