Skip to main content

Keyboard Navigation

Programmatic Focus Navigation

DockviewApi provides two methods for moving focus between panels and groups programmatically, useful for building keyboard shortcut handlers:

// Move focus to the next panel or group
api.moveToNext({ includePanel: true });

// Move focus to the previous panel or group
api.moveToPrevious({ includePanel: true });

Both accept an optional options object:

OptionTypeDescription
includePanelbooleanIf true, cycles through individual panels within groups. If false (default), cycles through groups only.
groupDockviewGroupPanelScope navigation to start from a specific group.
// Cycle only through groups (not individual panels within them)
api.moveToNext();

// Cycle through all panels across all groups
api.moveToNext({ includePanel: true });

Live Example