fix test mock keyevent