         fragment.on 'baz', bazHandler
 
         target = fragment.find('.grandchild-node')[0]
-        handler.handleKeyEvent(keypressEvent('x', target: target))
+        keymap.handleKeyEvent(keypressEvent('x', target: target))
 
         expect(fooHandler).not.toHaveBeenCalled()
         expect(barHandler).not.toHaveBeenCalled()
         expect(bazHandler).toHaveBeenCalled()
+

    insertCharHandler = null

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

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

$ = require 'jquery'

describe "GlobalKeymap", ->
  keymap = null

  beforeEach ->
    keymap = new GlobalKeymap

  describe "handleKeyEvent", ->
    fragment = null
