Custom Commands and Keyboard Shortcuts
A single command registry lets developers register commands once, with an ID, label, handler, enabled predicate, and an optional shortcut. Those commands then appear in the palette, in menus, and in the toolbar, and the shortcuts are shown next to menu items. This keeps actions consistent across every surface.
Planned. This page shows the specification from issue #202. The live example, source for every framework and the API reference replace it when the feature ships.
Live example
A tasks grid where 'Duplicate row' and 'Mark done' are registered as commands.
Expected behavior
Each command is available from the context menu, the palette, and its shortcut, with the same behaviour on every surface. Disabled state is reflected everywhere at once.
Planned API surface
api.registerCommand(def)api.unregisterCommand(id)api.executeCommand(id,args)CommandDef{id,label,category,shortcut,isEnabled,run}MenuItemDef.commandToolbarItem.commandAcceptance criteria
- A menu item that references a command inherits its label, shortcut, and enabled state. (pending)
- Shortcuts are platform-aware (Ctrl on Windows and Linux, Cmd on macOS). (pending)
- Duplicate shortcut bindings produce a development warning. (pending)
- Shortcuts do not fire while a cell editor or a text input has focus, unless allowInEditor is set. (pending)