Need help on how to disable keyboard input in Viewer API

viewer-api
navigation
viewer

(SRF Studio) #1

Hello,

I'm experimenting with Viewer API & trying to figure out how to produce a viewing experience of a room similar to 360° panoramic views. I inserted following codes...

camera: 0
scrollwheel: 0
annotations_visible: 0
navigation: "fps"

...and they all work, camera is starting from where it should, there is no scrolling with mouse wheel, annotations are functional through extra code with buttons & navigation starts with FPS but... :slight_smile:

Since keyboard is still active every possible keyboard action is still present so in Orbit mode user can zoom in/out, in FPS mode he can walk with WSAD.

Is there a way to disable keyboard input in API or, at least, disable WSAD/Ctrl input? Any help would be greatly appreciated.


#2

You can set the default FPS speed to zero with fps_speed: 0, and since you've disabled the scroll wheel, users will not be able to increase the speed, so WASD won't move.


(SRF Studio) #3

Thank you for a quick answer, just tried it, it worked out great :slight_smile: I can't believe I didn't think of that, sorry for the stupid question :smile: