Good news: I've been working on a w3c specification to address this. The feature is available for developers to experiment with now in Chrome (details below). And, a FireFox implementation is on it's way too, thanks primarily to David Humphrey using it as a class project.
Today the first Chrome Canary build is available to try the feature out:
- Get a build.
- Chrome Canary builds auto-update daily and install without interfering with your normal installation of Chrome, they're the way to go since they're so easy. Unless your on Linux, where you need to just get a recent Linux Build.
- Enable pointer lock.
- Navigate to about:flags, find Enable Pointer Lock, and restart (there's a button below).
- Try a demo.
- http://media.tojicode.com/q3bsp/ is a nice one from Brandon Jones and what you see in the screenshot above. It's a quake 3 BSP viewer.
- Others are sure to show up soon, minutes after landing the keystone WebKit patch I received a few IMs and emails from excited developers.
- Go Fullscreen. (more on that later)
- Allow the site to disable your mouse cursor.
- This setting is remembered for each site, and can be forgotten in Chrome's preferences / content settings.
- Read some doc https://developer.mozilla.org/en/API/Mouse_Lock_API.
There's a lot that will be changing with this. First, I have several issues still to deal with in the WebKit implementation, a security review will certainly find more, and oh yeah we're going to overhaul the spec to be as identical as possible to the Fullscreen spec.
Developers interested in the nitty gritty implementation details can see the chromium bug http://code.google.com/p/chromium/issues/detail?id=72754. To follow along, please only star the issue (top left). If you've made awesome demos and add this feature, drop a comment here. ;)