title: Backbone event firing on click OR press enter
body: <p>I am new to backbone and I am looking for a way for my button to be triggered when I press <kbd>Enter</kbd> as well as clicking. Currently <code>showPrompt</code> only executes on a click. What is the cleanest DRYest way to have it execute on pressing <kbd>Enter</kbd> as well, preferably only for that input field.</p>
  <pre><code>(function () {
  
    var Friend = Backbone.Model.extend({
      name: null
    });
  
    var Friends = Backbone.Collection.extend({
      initialize: function (models, options) {
        this.bind(&quot;add&quot;, options.view.addFriendLi);
      }
    });
  
    var AppView = Backbone.View.extend({
      el: $(&quot;body&quot;),
      initialize: function() {
        this.friends = new Friends(null, {view: this});
      },
      events: {
        &quot;click #add-friend&quot;:  &quot;showPrompt&quot;,
      },
      showPrompt: function () {
        var friend_name = $(&quot;#friend-name&quot;).val()
        var friend_model = new Friend({ name:friend_name });
        this.friends.add( friend_model );
      },
      addFriendLi: function (model) {
        $(&quot;#friends-list&quot;).append(&quot;&lt;li&gt;&quot; + model.get('name') + &quot;&lt;/li&gt;&quot;);
      }
    });
  
    var appView = new AppView; 
  
  }());
  </code></pre>
  <p>Also where can I read more about this kind of event binding? Do backbone events differ from JS or jQuery events in how they're defined?</p>