Control scenes with controller

(Joseluis Lara) #1

Hello everyone.

I made a presentation (Powerpoint-like) with hype 3 since I often give short clases in my work. I would like to change scenes with a controller I have, like I do with a normal powerpoint presentation. But I have tried different codes and ways but I just cant get to to work.

The code i used is the followed;

document.onkeydown = checkKey;

function checkKey(e) {

e = e || window.event;

if (e.keyCode == '39, 33') {
    // right arrow
else if (e.keyCode == '37, 34') {
    // left arrow

indent preformatted text by 4 spaces

Do you have any idea how I can do this ?

Thank you


You can use this page to see what ‘key code’ your controller presses: You can then use those values in place of the 39, 33 or 37, 34 in the code above.

If it doesn’t seem to show any keycodes, you may need to adjust settings for your controller.

(Joseluis Lara) #3

Awesome, I finally got it to work. Thanks for you help.