if (button == OuyaController.BUTTON_MENU) {
updateController(controller, button, true);
var e = $.Event("keydown", { keyCode: 32});
$("#IFRAMEid").trigger(e);
setTimeout(function(){ updateController(controller, button, false)}, 1000);
}
Problem description:
The web client iframe expects the spacebar key as input. I push menu button it shows the menu png for a moment then nothing- no input registered to the iframe.
I got a BYOND game to work on OUYA, I'm stuck, what do I need to route keyboard presses to simulate keyboard input? Shouldn't this work? I'm using the virtual controller example.
full link
[edit]
Or maybe not. If this is being done outside of the iframe, that's gonna be tougher to handle. I don't know if you can generate events and have them trigger inside an iframe, at least not one with a different domain.