Skip to content

Commit

Permalink
[Keychain] Fix issue with menu events being triggered by actions that…
Browse files Browse the repository at this point in the history
… are not exact matches
  • Loading branch information
OverloadedOrama committed Jul 7, 2022
1 parent a368ea5 commit f8c7494
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions addons/keychain/Keychain.gd
Original file line number Diff line number Diff line change
Expand Up @@ -83,15 +83,15 @@ 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
if acc == event.get_scancode_with_modifiers():
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
Expand Down

0 comments on commit f8c7494

Please sign in to comment.