You are not logged in.

Dear visitor, welcome to krpano.com Forum. If this is your first visit here, please read the Help. It explains in detail how this page works. To use all features of this page, you should consider registering. Please use the registration form, to register here or read more information about the registration process. If you are already registered, please login here.

1

Saturday, January 16th 2016, 6:35pm

How to give "focus" to pano for keyboard control ?

Everything is in the title.

I have the following scenario:


An image stand in the pano, explaining the user he can rotate the pano with keyboard arrows. He click on the picture, the picture disappear. -> I'm looking for a way to give "focus" to the pano on one click event, so that the user can start rotate the pano straight away, without having to find out he has to click first on the pano to be able to control it with the keyboard arrows.

Any idea ? Is there some kind of "getFocus" function which I couldn't find ?

Thanks !

2

Tuesday, January 19th 2016, 9:13pm

Hi,

right, at the moment a click into the pano itself is required to give krpano the focus and to enable the keyboard control - but it should give krpano also the focus when clicking any other element inside krpano - I will improve this (and I will look for way/API to set the focus also directly).

As workaround you could try this Javascript code to give krpano the focus:

Source code

1
2
3
4
5
function krpano_focus(id)
{
  document.getElementById(id).focus();
  window.activekrpanowindow = id;
}


and then e.g. call:

Source code

1
krpano_focus("krpanoSWFObject");


(where "krpanoSWFObject" is the id that will be set during embedding).

Best regards,
Klaus

3

Thursday, January 21st 2016, 12:11pm

Hi Klaus,

Thank you very much for your answer ! I'm gonna try that ! *thumbup*


Best,


Oli

4

Tuesday, February 23rd 2016, 6:00pm

Hey,

is there already any development concerning this functionality ? Is there now a way to make the pano controllable directly with the keyboard's arrows after loading, without having to click in it first ?

5

Wednesday, February 24th 2016, 9:00pm

Hi,

yes, that will be in the next release (this is already finished).

Best regards,
Klaus

6

Friday, February 26th 2016, 3:44pm

Wow, thanks Klaus !

Looks like you're making the job done very efficiently ! *thumbsup*