These are chat archives for openseadragon/openseadragon

14th
Dec 2016
Samuel Allen
@dehuszar
Dec 14 2016 00:33
Hey all. I'm trying to find some api docs or examples of how to disable keyboard navigation, or alter the shortcuts. I'm getting conflicts elsewhere in my application
I've found the keyUp/DownHandler's in the api docs, but I'm not sure how they expect to be set
Ian Gilman
@iangilman
Dec 14 2016 00:39
@dehuszar Unfortunately we don't really have a good mechanism for modifying the key combos... you basically have to override the entire handler with your own code... the way we currently have it set up, we do some keys on keydown and others on keypress. Take a look at https://github.com/openseadragon/openseadragon/blob/master/src/viewer.js#L2370-L2455
You can do viewer.innerTracker.keyHandler = function(event) {...} and the same for keyDownHandler to overwrite with your own
Samuel Allen
@dehuszar
Dec 14 2016 00:41
@iangilman That's good enough for my purposes, thanks!
Ian Gilman
@iangilman
Dec 14 2016 00:42
Cool. Maybe some day someone will put in real keyboard mapping
Samuel Allen
@dehuszar
Dec 14 2016 00:43
Perfect! That did it.
Well, who knows. For now I just set the key/keyDownHandler to null and got the results I needed, but if we need to provide alternate mappings in the future and I can get sign-off on the time I might try writing a plugin or pull-request
Ian Gilman
@iangilman
Dec 14 2016 00:45
Right on :)
Samuel Allen
@dehuszar
Dec 14 2016 00:46
In the meantime, thanks again! Especially for the super quick response
Have a great evening (if it is in fact evening on your end)
Ian Gilman
@iangilman
Dec 14 2016 00:46
Happy to help when I can! Yes, evening, and dark early this time of year!
Samuel Allen
@dehuszar
Dec 14 2016 00:47
Same here. Michigan is about to get hit with that polar vortex
Ian Gilman
@iangilman
Dec 14 2016 00:48
Stay safe! Of course my daughter would be jealous (assuming there's snow involved)...
Samuel Allen
@dehuszar
Dec 14 2016 00:48
There is definitely snow involved.
Ian Gilman
@iangilman
Dec 14 2016 00:50
Well, enjoy some for her!
I figure as long as the internet doesn't go down, it's all good ;)
Samuel Allen
@dehuszar
Dec 14 2016 00:53
:D Agreed
Patrick Liechty
@patrickliechty
Dec 14 2016 18:15
@iangilman Thanks for the help