SVAR Gantt handles keyboard input through theDocumentation Index
Fetch the complete documentation index at: https://mintlify.com/svar-widgets/gantt/llms.txt
Use this file to discover all available pages before exploring further.
hotkey action. When the Gantt (or chart area) has focus and the user presses a supported key combination, the action is dispatched through the event bus and the appropriate operation is performed.
Supported shortcuts
| Shortcut | Action |
|---|---|
Arrow Up | Select the task above the current selection |
Arrow Down | Select the task below the current selection |
Ctrl + C | Copy the selected task |
Ctrl + X | Cut the selected task |
Ctrl + V | Paste the previously copied or cut task |
Ctrl + D | Delete the selected task |
Backspace | Delete the selected task |
Ctrl + Z | Undo the last action |
Ctrl + Y | Redo the last undone action |
Hotkeys are ignored when the cursor is inside an
<input> or <textarea> element so they do not interfere with text editing.How hotkeys work
The hotkey system listens forkeydown events on the document. When a qualifying key combination is detected, it dispatches the hotkey action through api.exec:
Arrow navigation
Arrow Up and Arrow Down move the selection through the flat task list. When triggered from the chart area (eventSource === "chart"), the Gantt also scrolls both axes (xy) to keep the selected task visible. When triggered from the grid, only vertical scrolling is applied.
Intercepting and customising hotkeys
You can intercept thehotkey action to add custom behaviour or override defaults:
false:
Fullscreen shortcut
TheFullscreen component from @svar-ui/svelte-core adds a fullscreen toggle button to the Gantt. It also accepts a hotkey prop that registers a keyboard shortcut to toggle fullscreen mode:
hotkey string follows the same format used throughout the system: modifier keys joined with + in lowercase (ctrl, alt, shift, meta), followed by the key name (e.g. ctrl+shift+f, alt+enter).
Fullscreen component props
| Prop | Type | Description |
|---|---|---|
hotkey | string | Key combination to toggle fullscreen (e.g. "ctrl+shift+f") |
children | slot | Content to render inside the fullscreen container |
Key format reference
Key strings are normalised to lowercase with modifiers listed first:| Key pressed | Normalised string |
|---|---|
| Ctrl+C | ctrl+c |
| Ctrl+Shift+F | ctrl+shift+f |
| Arrow Up | arrowup |
| Arrow Down | arrowdown |
| Backspace | backspace |
| Space | space |
ctrl → alt → meta → shift → key.