Switch for mouse event