How to handle enter press event for EditorView


#1
class MyView extends View
  @contents: ->
      @div class: 'block' =>
          @subview 'cmdEditor', new EditorView(mini: true, placeholderText: 'input your command here')

How can I handle enter press event for the subview of cmdEditor


#2

What I’ve seen browsing other code, like Tree-View, is a hook:

@on "core:confirm", => do_stuff

See: https://github.com/atom/tree-view/blob/master/lib/dialog.coffee


#3

Thanks a lot. It works.