It's strange. Why is a keyboard press so complex? A console call should work.

What's the difference between a direct call and actually pushing the space bar on a physical keyboard with a webpage "active"?

Do virtual(on screen keyboards) keyboard applications work close enough to keyboard hardware that I can use them for testing how keyboard presses are called?
In response to Sir Quizalot
Sir Quizalot wrote:
It's strange. Why is a keyboard press so complex? A console call should work.

What's the difference between a direct call and actually pushing the space bar on a physical keyboard with a webpage "active"?

A JS-generated event and one that's directly created by the browser are two different things--especially from a security standpoint.

Do virtual(on screen keyboards) keyboard applications work close enough to keyboard hardware that I can use them for testing how keyboard presses are called?

Short answer: Probably, depending on how they mimic the keyboard. If they generate Windows keyboard events, the browser should think of them as legit keypresses and generate events on its own.
Developer tools running JavaScript through a console to simulate a key press should be subject to security issues?

Is the OUYA sdk preventing something I should be aware of?
In response to Sir Quizalot
Sir Quizalot wrote:
Developer tools running JavaScript through a console to simulate a key press should be subject to security issues?

Surprisingly, yes. That's always been my experience, anyway: the browser treats them like script happening on the page.

Is the OUYA sdk preventing something I should be aware of?

I really wouldn't know if there's more going on than that. All I can tell you is, I've already looked into routing keyboard events extensively and the best I can say is that generating an event and sending it to an element is a muddy proposition at best, a million times muddier with cross-domain iframe issues in the way. The only well-recognized way to talk between iframes is via postMessage(). Trying to shoehorn this to use a keyboard event is a waste of time; postMessage() will work if you setup the requisite handlers and can get the outer frame (your site) and the innermost one (the game) to see each other, which I think is a doable proposition.
Page: 1 2