Refactored mouse events used in editors