send key or mouse click to window