Implemented mouse input on OSX.