Trap the user's cursor within an element for nicer game controls.