I'm using F11 and F12 for something else in my game so I needed to change the customizable shortcuts mentioned in #11
- addons/RuntimeDebugTools/DebugToggleKey3D
- addons/RuntimeDebugTools/DebugToggleKey3D
so I rebound them to Shift+F7 and Shift+F8
However, they were not recognized. I found two mistakes in the code of res://addons/runtime_debug_tools/scripts/debugger_runtime.gd causing this:
- The code tries to access project setting "DebugToggle2D" instead of "DebugToggleKey2D" (as set in plugin.gd with
add_project_keybinding("DebugToggleKey3D", "F12"), etc.)
- The code only checks
keycode instead of get_keycode_with_modifiers(). For 3D check more below, it repeats the same mistake.
My fix diff looks like this:
var key_2d = ProjectSettings.get_setting("addons/RuntimeDebugTools/DebugToggle2D")
=>
var key_2d = ProjectSettings.get_setting("addons/RuntimeDebugTools/DebugToggleKey2D")
var key_3d = ProjectSettings.get_setting("addons/RuntimeDebugTools/DebugToggle3D")
=>
var key_3d = ProjectSettings.get_setting("addons/RuntimeDebugTools/DebugToggleKey3D")
if key_event.keycode == _debug_key_3d or key_event.keycode == _debug_key_2d:
=>
if key_event.get_keycode_with_modifiers() == _debug_key_3d or key_event.get_keycode_with_modifiers() == _debug_key_2d:
var is_3d := key_event.keycode == _debug_key_3d
=>
var is_3d := key_event.get_keycode_with_modifiers() == _debug_key_3d
Although I would personally store the keycode with modifiers to avoid getting it several times.
I'm using F11 and F12 for something else in my game so I needed to change the customizable shortcuts mentioned in #11
so I rebound them to Shift+F7 and Shift+F8
However, they were not recognized. I found two mistakes in the code of res://addons/runtime_debug_tools/scripts/debugger_runtime.gd causing this:
add_project_keybinding("DebugToggleKey3D", "F12"), etc.)keycodeinstead ofget_keycode_with_modifiers(). For 3D check more below, it repeats the same mistake.My fix diff looks like this:
Although I would personally store the keycode with modifiers to avoid getting it several times.