Automatically capture/release mouse.