capture and generate events in editor