Joysticks + Javascript
October 27, 2009 5:20 AM   Subscribe

How do I get to access my joystick via javascript, independent of platform?

Is there a way to detect joystick events and pass them to javascript agnostic to the OS?

I am aware of this: http://www.bigredswitch.co.uk/toolbox/joystick/

but this is Windows-OSX Firefox-Safari specific.

Any ideas?
posted by yegga to Computers & Internet (6 answers total) 1 user marked this as a favorite
 
This is probably rather difficult. I don't know though, just guessing. Joysticks are a second citizen in the input managers of most OS'es. Do you want to do this in a browser?
posted by krilli at 6:11 AM on October 27, 2009


If you're willing to substitute mouse for joystick in your question, no problem. Or your joystick emulates a mouse. Otherwise, no dice.
posted by jdfan at 6:21 AM on October 27, 2009


... BUT ... this could be really, really easy to just implement. Someone could probably whip together SDL / Qt code that does this in a heartbeat.

I'm on a trip right now and can't attend to this, but please message me later if this goes anywhere.
posted by krilli at 6:25 AM on October 27, 2009


Does Flash have something you could hook into?
posted by ph00dz at 6:26 AM on October 27, 2009


Response by poster: Yes, I want to do this in a browser. I'd rather stay away from Flash.
posted by yegga at 7:34 AM on October 27, 2009


You're not going to be able to do this without a browser plugin or driver trickery that turns your joystick into the pointing device on whatever system you're using. There is no native JavaScript API for accessing input devices (or any other devices) that the browser does not natively support.
posted by mikeh at 12:24 PM on October 27, 2009


« Older Figure out the movie, then figure out the song?   |   Name that campaign - innovation + social media Newer »
This thread is closed to new comments.