Keyboard controls #3484
clochardM33
started this conversation in
General
Replies: 1 comment 7 replies
-
Hi @clochardM33, about your first question, PRs are welcomed. |
Beta Was this translation helpful? Give feedback.
7 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
Hi,
Today's question is about keyboard control.
Is there any chance you can extend the keyboard interaction to include panning when the shift/ctrl/meta key is pressed (so that you have both mouse and keyboard controls)? The models I'm involved with are very CAD-ish and lend themselves to having meaning in orthogonal views. So it would be a bonus to be able move with the keyboard in a single axis which is a nightmare with a mouse. I can see the keycodes lurking at the bottom of SmoothControls.ts , just waiting to be extended.
Also I've found that you have to click into the model-viewer element for the keyboard to respond (such as immediately after the model loads). Is this just a matter of having to give focus to the element?
And of course the next question is... is there are way to "give focus" programatically?
Apart from straight after loading I have an arrangement with a set of buttons that swicth to specific view (ie hotspots without the hotspots). To use the keyboard from this point I have to click into the model which, of course, shifts the camera position by some amount. Gotcha!
Beta Was this translation helpful? Give feedback.
All reactions