Eventhandler "controller_key_down"

Hi,

i have a problem with the eventhanlder "controller_key_down".

I write following function, but when i press the Key "1" nothing happen. I also tryed other keys, but it doesnt work. Can someone help me with this problem

function handleEvent(evt)
{
switch (evt.key)
{
case VK_1:
Player.playlist.titles["robots"].chapters[1].jump("00:00:00:00",false);
break;
}
}

application.addEventListener("controller_key_down",handleEvent,true);



Answer this question

Eventhandler "controller_key_down"

  • Alexandr Vishnyakov

    Are you sure the script file is running Is it listed in the manifest as a <Script> and as a <Resource> element

  • ZimY

    USB Keyboards are an issue with iHDSim. I'm using my Qosmio laptop this week with a USB MIcrosoft Natural Keyboard Elite connected via USB. While running some projects in the iHDSim, I can use (for example) CTRL+M on the laptop keyboard but not on the USB attached keyboard.


  • MechEng85

    True, after attaching a non USB keyboard all the keyboard keys worked fine again.
  • Wee Bubba

    I'm having a similar issue using your code from the BareBones menu. You mentioned something in the blog post about USB keyboards. Is that really an issue and is it possible this person is having that problem

  • WingingIT

    Try using 0x31 instead of VK_1
  • mmmmBeeeer

    That did not solve the problem :/

     

    edit:

    i have 4 files in my proect. main.xmu main.xsf main.js and VPTST000.xpl

    And I write it in the main.js an doesn't define anything at any other place.


  • Eventhandler "controller_key_down"