     @commands = {}
     @alterMethod = options.alterMethod || "extend"
     @keyQueue = ""
+    @keyPressCount = 0
     @yankedText = ""
     super options
 

    super extend defaults, options

    extend @commands,
      "y": ->
        # Special case: "yy" (the first from edit mode, and now the second).
        @selectLine() if @options.yYanksLine
        @yank()
      "V": -> new VisualLineMode extend @options, initialRange: @selection.getRangeAt(0).cloneRange()

    if @options.underEditMode
      extend @commands,
        "d": -> @yank deleteFromDocument: true
        "c": -> @yank(); enterInsertMode()
    else
      @installFindMode()

    @clipboardContents = ""
    @paste (text) => @clipboardContents = text

  protectClipboard: (func) ->
    func()
    @copy @clipboardContents

  copy: (text) ->
    super @clipboardContents = text


  enterVisualMode: (options = {}) ->
    defaults =
      badge: ""
      underEditMode: true
      initialCount: @countPrefix
      oneMovementOnly: true
