merged customevent from ethanius; split mouseevent