Skip to content

Commit

Permalink
Get rid of Keychain.action_get_first_key() on the extra shortcuts of …
Browse files Browse the repository at this point in the history
…tools
  • Loading branch information
OverloadedOrama committed Jul 18, 2023
1 parent 26ac7f3 commit 8405ba9
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions src/Autoload/Tools.gd
Original file line number Diff line number Diff line change
Expand Up @@ -250,11 +250,11 @@ class Tool:
hint += "\n\n" + extra_hint

var extra_shortcuts_mapped := []
for event in extra_shortcuts:
var key: InputEventKey = Keychain.action_get_first_key(event)
for action in extra_shortcuts:
var key_string := "None"
if key:
key_string = OS.get_keycode_string(key.get_keycode_with_modifiers())
var events := InputMap.action_get_events(action)
if events.size() > 0:
key_string = events[0].as_text()
extra_shortcuts_mapped.append(key_string)

shortcuts.append_array(extra_shortcuts_mapped)
Expand Down

0 comments on commit 8405ba9

Please sign in to comment.