 
     describe "when the event's target node matches a selector with a matching binding", ->
       it "triggers the command event associated with that binding on the target node", ->
-        handler.handleKeyEvent(keypressEvent('x', target: fragment[0]))
+        keymap.handleKeyEvent(keypressEvent('x', target: fragment[0]))
         expect(deleteCharHandler).toHaveBeenCalled()
         expect(insertCharHandler).not.toHaveBeenCalled()
 
         deleteCharHandler.reset()
         fragment.removeClass('command-mode').addClass('insert-mode')
 
-        handler.handleKeyEvent(keypressEvent('x', target: fragment[0]))
+        keymap.handleKeyEvent(keypressEvent('x', target: fragment[0]))
         expect(deleteCharHandler).not.toHaveBeenCalled()
         expect(insertCharHandler).toHaveBeenCalled()
+
+    describe "when no binding matches the event", ->
+      it "returns false", ->
+        expect(keymap.handleKeyEvent(keypressEvent('0', target: fragment[0]))).toBe(false)
 
     describe "when the event's target node *descends* from a selector with a matching binding", ->
       it "triggers the command event associated with that binding on the target node", ->
         target = fragment.find('.child-node')[0]
-        handler.handleKeyEvent(keypressEvent('x', target: target))
+        keymap.handleKeyEvent(keypressEvent('x', target: target))
         expect(deleteCharHandler).toHaveBeenCalled()
         expect(insertCharHandler).not.toHaveBeenCalled()
 
         deleteCharHandler.reset()
         fragment.removeClass('command-mode').addClass('insert-mode')
 
-        handler.handleKeyEvent(keypressEvent('x', target: target))
+        keymap.handleKeyEvent(keypressEvent('x', target: target))
         expect(deleteCharHandler).not.toHaveBeenCalled()
         expect(insertCharHandler).toHaveBeenCalled()
 
     describe "when the event's target node descends from *multiple* selectors with a matching binding", ->
       it "only triggers bindings on selectors associated with the closest ancestor node", ->
-        handler.bindKeys '.child-node', 'x': 'foo'
+        keymap.bindKeys '.child-node', 'x': 'foo'
         fooHandler = jasmine.createSpy 'fooHandler'
         fragment.on 'foo', fooHandler
 
         target = fragment.find('.grandchild-node')[0]
-        handler.handleKeyEvent(keypressEvent('x', target: target))
+        keymap.handleKeyEvent(keypressEvent('x', target: target))
         expect(fooHandler).toHaveBeenCalled()
         expect(deleteCharHandler).not.toHaveBeenCalled()
         expect(insertCharHandler).not.toHaveBeenCalled()
 
     describe "when the event bubbles to a node that matches multiple selectors", ->
       it "triggers the binding for the most specific selector", ->
-        handler.bindKeys 'div .child-node', 'x': 'foo'
-        handler.bindKeys '.command-mode .child-node', 'x': 'baz'
-        handler.bindKeys '.child-node', 'x': 'bar'
+        keymap.bindKeys 'div .child-node', 'x': 'foo'
+        keymap.bindKeys '.command-mode .child-node', 'x': 'baz'
+        keymap.bindKeys '.child-node', 'x': 'bar'
 
         fooHandler = jasmine.createSpy 'fooHandler'
         barHandler = jasmine.createSpy 'barHandler'

    insertCharHandler = null

    beforeEach ->
      handler.bindKeys '.command-mode', 'x': 'deleteChar'
      handler.bindKeys '.insert-mode', 'x': 'insertChar'

      fragment = $ """
        <div class="command-mode">

        fragment.on 'baz', bazHandler

        target = fragment.find('.grandchild-node')[0]
        keymap.handleKeyEvent(keypressEvent('x', target: target))

        expect(fooHandler).not.toHaveBeenCalled()
        expect(barHandler).not.toHaveBeenCalled()
        expect(bazHandler).toHaveBeenCalled()

