 
   # Deprecated: Handle a jQuery keyboard event. Use {::handleKeyboardEvent} with
   # a raw keyboard event instead.
-  handleEvent: (event) ->
-    @handleKeyboardEvent(event.originalEvent ? event)
+  handleKeyEvent: (event) ->
+    event = event.originalEvent ? event
+    @handleKeyboardEvent(event)
+    false if event.defaultPrevented
 
   # Deprecated: Translate a jQuery keyboard event to a keystroke string. Use
   # {::keystrokeForKeyboardEvent} with a raw KeyboardEvent instead.
   keystrokeStringForEvent: (event) ->
     @keystrokeForKeyboardEvent(event.originalEvent ? event)
+
+  # Deprecated: Use addKeyBindings with a map from selectors to keybindings
+  bindKeys: (source, selector, keyBindings) ->
+    @addKeyBindingsForSelector(source, selector, keyBindings)

    @keyBindings = []
    @keystrokes = []

  # Public: Add sets of key bindings grouped by CSS selector.
  #
  # source - A {String} (usually a path) uniquely identifying the given bindings

  #   keystroke patterns to commands.
  addKeyBindings: (source, keyBindingsBySelector) ->
    for selector, keyBindings of keyBindingsBySelector
      @addKeyBindingsForSelector(source, selector, keyBindings)

  addKeyBindingsForSelector: (source, selector, keyBindings) ->
    # Verify selector is valid before registering any bindings
    try
      document.body.webkitMatchesSelector(selector)
    catch
      console.warn("Encountered an invalid selector adding keybindings from '#{source}': '#{selector}'")
      return

    for keystroke, command of keyBindings
      keyBinding = new KeyBinding(source, command, keystroke, selector)
      @keyBindings.push(keyBinding)

  handleKeyboardEvent: (event) ->
    @keystrokes.push(@keystrokeForKeyboardEvent(event))
