Default Shortcut
The default shortcut to toggle vector visibility is:Shift + V
Press Shift + V during runtime to show/hide all vector displays.
- Quick debugging during playtesting
- Toggling visualizations without modifying code
- Demonstrating features in presentations
- Comparing gameplay with and without vector displays
How It Works
The shortcut is implemented through a sharedInputEventKey resource that all VectorDisplay2D nodes reference:
show_vectors property:
The shortcut affects all VectorDisplay2D nodes simultaneously since they share the same settings resource or check the same SHORTCUT constant.
Customizing the Shortcut
You can change the shortcut by editing thedisplay_shortcut.tres resource file.
Open in Inspector
Click on
display_shortcut.tres to open it in the Inspector panel.You’ll see an InputEventKey resource with these properties:- Device: -1 (all devices)
- Shift Pressed: true
- Keycode: 86 (V key)
- Unicode: 86
Modify the key binding
Change the properties to your preferred shortcut:Example 1: Change to Shift + D (Debug)Example 2: Change to Ctrl + VExample 3: Change to F9 (no modifiers)
Finding Keycodes
To find the keycode for any key:- Method 1: Input Map
- Method 2: Script Test
- Method 3: Common Keys
- Go to Project > Project Settings > Input Map
- Create a temporary action
- Click the ”+” button and select “Key”
- Press your desired key
- The keycode will be shown in the event details
Advanced Customization
Using Project Input Actions
For more flexibility, you can modify the addon to use your project’s Input Map:Create an Input Action
- Go to Project > Project Settings > Input Map
- Add a new action:
toggle_vector_display - Bind your preferred key(s)
- Use multiple key bindings
- Configure separately for different input devices
- Leverage Godot’s built-in input remapping features
Per-Node Shortcuts
If you want different shortcuts for different vector displays:Conditional Shortcuts
Disable shortcuts in certain game states:Shortcut Examples
Example Configurations
- Developer Friendly
- Presentation Mode
- Gamepad Support
F5 - Conflicts less with text editing
Troubleshooting
Shortcut not working?Check if input is being handled elsewhere
Check if input is being handled elsewhere
Another node might be consuming the input event. Check your
_input() or _unhandled_input() functions.Verify the resource is saved
Verify the resource is saved
Ensure you saved
display_shortcut.tres after editing. Check the file in a text editor:Check modifier keys
Check modifier keys
Ensure all modifiers match exactly:
shift_pressedctrl_pressedalt_pressedmeta_pressed(Command on Mac)
Test in isolation
Test in isolation
Create a minimal test scene with only a VectorDisplay2D node to verify the shortcut works.
Next Steps
- Learn about runtime configuration for programmatic control
- Explore customization options to style your vectors
- Create presets for different visualization modes
