Shortcut Legend
Displays a context-sensitive keyboard/mouse shortcut legend bar at the bottom of the editor, showing all available shortcuts for the current edit mode.
Displays a context-sensitive keyboard/mouse shortcut legend bar at the bottom of the editor, showing all available shortcuts for the current edit mode.
Public API
| Function | Signature | Description |
|---|---|---|
M.onEditorInitialized | () | Registers modifier name mappings and shows the legend window |
M.onEditorGui | () | Renders the shortcut legend bar with styled key badges |
M.onEditorEditModeChanged | (oldEditMode, newEditMode) | Triggers action list refresh on mode change |
Shortcut Sources
- Mode-specific legend: If edit mode provides
getLegendCurrentActionNames(), those are displayed - Action map bindings: Falls back to scanning keyboard/mouse bindings for the edit mode's action map
- Auxiliary shortcuts: Merged from
editor.editMode.auxShortcutstable
Modifier Names
| Flag | Display |
|---|---|
AuxControl_Ctrl | Ctrl |
AuxControl_Shift | Shift |
AuxControl_Alt | Alt |
AuxControl_LMB | LMB |
AuxControl_MMB | MMB |
AuxControl_RMB | RMB |
AuxControl_MWheel | MouseWheel |
AuxControl_LMB_Drag | LMB Drag |
AuxControl_Copy | Ctrl C |
AuxControl_Paste | Ctrl V |
AuxControl_Delete | Delete |
Usage Example
-- The shortcut legend is always visible when the editor is active.
-- It automatically updates when switching edit modes.
-- Custom edit modes can provide shortcuts:
editor.editModes.myMode = {
auxShortcuts = {
[editor.AuxControl_LMB] = "Place Object",
[editor.AuxControl_Ctrl + editor.AuxControl_LMB] = "Multi-select",
["G"] = "Toggle Grid",
},
}Notes
- Renders as a horizontal bar with rounded key badges
- Automatically wraps to next line when shortcuts exceed window width
- Centers shortcuts when total width is less than available space
- Sorted alphabetically by control key name
Functions
onExtensionLoaded()
Callback for extension loaded event.
Additional Exports
M.onExtensionLoaded
See Also
- Editor AI Tests - Related reference
- Editor AI Visualization - Related reference
- Editor – Assembly Spline Tool - Related reference
- World Editor Guide - Guide
Shape Editor
Interactive 3D shape viewer and editor - supports detail level inspection, render flag toggling, node hierarchy viewing, material highlighting, LOD generation, sequence animation, and Collada/Wavefron
Sidewalk Spline Editor
Editor tool for placing sidewalk meshes along splines - uses mesh kits with base pieces and variations, supports distribution control (round-robin/random with weights), terrain conforming/terraforming