Sie sind nicht angemeldet.

1

Samstag, 7. November 2009, 12:24

additional control buttons of the keyboard

We have control buttons by default: Shift, Ctrl, Up, Down, Left, Right.

Is it possible to use additional buttons of the keyboard for navigation in a tour?

F - on/off FullScreen mode
A - open/close ABOUT textfield
H - open/close HELP textfield
C - open/close COPYRIGHT textfield
1 - open/close 1st map
2 - open/close 2nd map
etc.

2

Samstag, 7. November 2009, 13:16

Hi,

yes, there is the onkeydown event and the keycode variable for that,
e.g.

Quellcode

1
2
3
4
5
6
7
8
<events onkeydown="checkkey();" />

<action name="checkkey">
  trace('keycode=', keycode);
  if(keycode == 70, switch(fullscreen));
  if(keycode == ??, ...);
  ...
</action>


open the log ('O'-key) to find out the keycode of the current pressed key (see the trace action),
and then make a if() and check for the key you want to do something...
but note - in fullscreen mode - only a few keys are working (esc, cursors keys, ...)

best regards,
Klaus

3

Samstag, 7. November 2009, 15:56

thanks, Klaus
'A'-kay is also "zoom IN" action. by default.
How to disable this action?
Alex

4

Samstag, 7. November 2009, 16:07

Hi,

have a look here for keycodesin and keycodesout:
http://krpano.com/docu/xml/#control

to remove 'A', set a new value for keycodesin without the 'A' keycode (=65),

e.g. to zoom only with the shift and the '+'-key:

Quellcode

1
<control keycodesin="16,107" />


best regards,
Klaus

5

Samstag, 7. November 2009, 16:28

I have set new value, but this button carries out both actions: "zoom in" & "open about textfield"

Quellcode

1
2
<!-- A - open about textfield -->
  if(keycode == 65, "action(show_about_field); action(hidehelp,helptext); action(hidecopyright,copyrighttext);");


The code control keycodesin="16,107" has not helped
---------
It works, when the code <control keycodesin="16,107" /> is in the main XML file.

many thanks

Ähnliche Themen