Keyboard Navigation
Tourista provides built-in keyboard support for navigating through tours, making them accessible and providing power users with quick navigation options.
Supported Keys
Arrow Right (→)
Advances to the next step in the tour.
Action: Sends
NEXTeventEquivalent to: Clicking the "Next" button
Respects: Step's
canNextsetting
Arrow Left (←)
Goes back to the previous step.
Action: Sends
PREVeventEquivalent to: Clicking the "Previous" button
Respects: Step's
canPrevsetting
Escape (Esc)
Skips/exits the tour entirely.
Action: Sends
SKIP_TOUReventEquivalent to: Clicking the "Skip" button
Triggers:
onSkipcallback
How It Works
The keyboard navigation is automatically enabled when a tour is active. The implementation listens for keydown events on the document:
Usage
Keyboard navigation works automatically - no configuration needed:
Interaction with Other Features
With Auto-Advance
Keyboard navigation works alongside auto-advance:
Users can:
Wait for auto-advance
Press
→to advance immediatelyPress
←to go back (cancels auto-advance)Press
Escto skip
With Async Steps
Keyboard navigation respects async step states:
Last updated