Merge pull request #719 from liuchuangww/event

Add user event
Added support for custom event
Fix event