example: keyboard navigation
The viewer supports keyboard operations to complement the drag and scroll
(zoom) mouse interactions.
To interact via the keyboard, the focus must be on the viewer.
In this example the focus is set using
document.getElementById('contentDiv').querySelector('.openseadragon-canvas').focus();
You can use the following keys to navigate:
- [ w, up arrow ] - move viewport up
- [ s, down arrow ] - move viewport down
- [ a, left arrow ] - move viewport left
- [ d, right arrow ] - move viewport right
- [ 0 ] - zoom / move viewport home
- [ - / _, shift+W, shift+up arrow ] - zoom viewport out
- [ = / +, shift+S, shift+down arrow ] - zoom viewport in
- [ r ] - rotate clockwise
- [ R ] - rotate counterclockwise
- [ f ] - flip horizontally
- [ j ] - change to previous image source (sequence mode)
- [ k ] - change to next image source (sequence mode)
Keyboard Navigation