Mouse movement and clicking detection