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 !

  • 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:

    Code
    function krpano_focus(id)
    {
      document.getElementById(id).focus();
      window.activekrpanowindow = id;
    }

    and then e.g. call:

    Code
    krpano_focus("krpanoSWFObject");

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

    Best regards,
    Klaus

  • 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 ?

Participate now!

Don’t have an account yet? Register yourself now and be a part of our community!