mouse handling simplified