simvx.editor.menus

Editor Menus: Menu bar setup and keyboard shortcuts.

Module Contents

Functions

make_shortcut_listener

Build a _shortcut_handler callable wired to state.shortcuts.

build_menu_bar

Create the editor’s menu bar with all menus wired to state.

register_shortcuts

Register all editor keyboard shortcuts.

API

simvx.editor.menus.make_shortcut_listener(state: simvx.editor.state.State) collections.abc.Callable[[str], bool][source]

Build a _shortcut_handler callable wired to state.shortcuts.

The returned function is suitable for installation on a

Class:

UIInputManager via tree._shortcut_handler = .... It reads currently-held modifier keys from :class:Input so the GLFW/SDL3 platform path (which sets Input._keys["ctrl"]=True before firing the ui_input(key=...) event) works without any extra plumbing.

Accepts either a bare key ("s") or a combo string with embedded modifiers ("shift+tab"), and unions both modifier sources.

simvx.editor.menus.build_menu_bar(state: simvx.editor.state.State) simvx.core.MenuBar[source]

Create the editor’s menu bar with all menus wired to state.

simvx.editor.menus.register_shortcuts(state: simvx.editor.state.State)[source]

Register all editor keyboard shortcuts.