Use a debounced function to change the cursor style on mouse move

Minor PR, just add a debounced function to reduce the number of function called on mousemove event