Updated FAQ (markdown)

pearcetm 2024-07-01 13:44:34 -04:00
parent 7b34559e1f
commit 500bff47ac

13
FAQ.md

@ -5,6 +5,7 @@
* [OpenSeadragon doesn't work well on mobile devices in portrait orientation](#mobile-portrait) * [OpenSeadragon doesn't work well on mobile devices in portrait orientation](#mobile-portrait)
* [OpenSeadragon isn't working right in my Vue application](#vue) * [OpenSeadragon isn't working right in my Vue application](#vue)
* [Can I use TIFF files in OpenSeadragon?](#tiff) * [Can I use TIFF files in OpenSeadragon?](#tiff)
* [How can I disable the default key bindings?](#keybindings)
## Questions and Answers ## Questions and Answers
@ -38,3 +39,15 @@ OpenSeadragon doesn't support TIFF files directly, but you have a number of opti
* Convert your TIFF file to one of the formats OpenSeadragon supports, like DZI. There are lots of tools for that at https://openseadragon.github.io/examples/creating-zooming-images/. * Convert your TIFF file to one of the formats OpenSeadragon supports, like DZI. There are lots of tools for that at https://openseadragon.github.io/examples/creating-zooming-images/.
* Use a server that converts the TIFF file on the fly, like https://iipimage.sourceforge.io/. * Use a server that converts the TIFF file on the fly, like https://iipimage.sourceforge.io/.
* Use the https://github.com/pearcetm/GeoTIFFTileSource plugin. * Use the https://github.com/pearcetm/GeoTIFFTileSource plugin.
### <a name="keybindings"></a>How can I disable the default key bindings?
The following code snippet will disable all of the default key bindings. You can edit the list of keys to be more specific depending on your application.
```
// suppress default OSD keydown handling for a subset of keys
viewer.addHandler('canvas-key',event=>{
if(['q', 'w', 'e', 'r', 'a', 's', 'd', 'f'].includes(event.originalEvent.key)){
event.preventDefaultAction = true;
}
});
```