Move keyEvent to editor.go
Moved editor code to library package.