Basic support for custom events.