Moved keydown and custom events to reBuild function
Merge branch 'dev'