Hi,
krpano has build-in keyboard events, no need to use external JS here:
https://krpano.com/docu/xml/#events.onkeydown
The keycode variable always contains the key-code of the last pressed or last released key.
With some custom code the current pressed key can be stored:
|
Quellcode
|
1
2
3
|
<events onkeydown="copy(pressedkey, keycode);"
onkeyup="set(pressedkey,0);"
/>
|
and then be checked in the onclick event:
|
Quellcode
|
1
2
3
4
|
<hotspot
...
onclick="if(pressedkey == 16, trace('shift-key pressed'); , trace('no shift-key pressed'); );"
/>
|
The keycode for shift is 16, for ctrl 17 and for alt 18.
Best regards,
Klaus