You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Original use case : be able to go forward/backward in browser history, using standard "Alt + LeftArrow" or "Alt + RightArrow" keyboard shortcut.
If I have a Viewer with keyboard: always option enabled, Left and Right Arrows are used for moving around the view. Pressing Alt key at the same time should avoid the camera move, and let browser do its thing. As now, viewer still moves around and browser doesn't do anything.
A special behaviour already exist for the Ctrl key, so I'm wondering if similar thing could be done for Alt key. If pressed, no basic key press would have effect, and keypress event goes up to browser.
Online demo URL
No response
Photo Sphere Viewer version
5.10.1
Plugins loaded
None
OS & browser
Linux, Firefox (but I guess it happens everywhere)
Additional context
Issue originating from Panoramax Web Viewer, where we wanted to be able to go forward/backward in history to go to previous shown image. I tried to work around PSV to not call PSV roll function if Alt is pressed. But at some point the keyboard event is intercepted and native browser forward/backward is never called.
Going further, I think the default actions should be totally ignored if any modifier key is pressed, as in its current state keyboardActions keys cannot specify a mofifier.
Additionally I would add the original event to the custom callback parameters.
'ArrowUp': 'ROTATE_UP',// will move the view only and only if ArrowUp alone is pressed'ArrowUp': (viewer,evt)=>// will be called in ArrowUp is pressed with or without modifier, but the modifiers are accessible in the "evt"
Describe the bug
Original use case : be able to go forward/backward in browser history, using standard "Alt + LeftArrow" or "Alt + RightArrow" keyboard shortcut.
If I have a Viewer with
keyboard: always
option enabled, Left and Right Arrows are used for moving around the view. Pressing Alt key at the same time should avoid the camera move, and let browser do its thing. As now, viewer still moves around and browser doesn't do anything.A special behaviour already exist for the Ctrl key, so I'm wondering if similar thing could be done for Alt key. If pressed, no basic key press would have effect, and keypress event goes up to browser.
Online demo URL
No response
Photo Sphere Viewer version
5.10.1
Plugins loaded
None
OS & browser
Linux, Firefox (but I guess it happens everywhere)
Additional context
Issue originating from Panoramax Web Viewer, where we wanted to be able to go forward/backward in history to go to previous shown image. I tried to work around PSV to not call PSV roll function if Alt is pressed. But at some point the keyboard event is intercepted and native browser forward/backward is never called.
Parts of code which almost work 😅
As it also happens on a classic, basic PSV viewer (if keyboard=always), I guess it makes sense to make this Alt behaviour handled mainstream.
The text was updated successfully, but these errors were encountered: