The mouselock API seems like the solution to this (once it's implemented in browsers).
Ashley are you meaning you won't implement it ?
I understand it can have drawbacks (a malicious element onscreen capturing and locking the mouse cursor isn't indeed something we want to see), but if implemented like for audio or events of the like under user's action, it should be fine, shouldn't it ?