       .sort (a, b) -> a.compare(b)
 
   clearQueuedKeystrokes: ->
-    this.queuedKeyboardEvents = []
-    this.queuedKeystrokes = []
-    this.bindingsToDisable = []
+    @queuedKeyboardEvents = []
+    @queuedKeystrokes = []
+    @bindingsToDisable = []
 
   enterPendingState: (pendingPartialMatches, enableTimeout) ->
-    this.cancelPendingState() if this.pendingStateTimeoutHandle?
-    this.pendingPartialMatches = pendingPartialMatches
+    @cancelPendingState() if @pendingStateTimeoutHandle?
+    @pendingPartialMatches = pendingPartialMatches
     if enableTimeout
-      this.pendingStateTimeoutHandle = setTimeout(this.terminatePendingState.bind(this, true), this.partialMatchTimeout)
+      @pendingStateTimeoutHandle = setTimeout(@terminatePendingState.bind(this, true), @partialMatchTimeout)
 
   cancelPendingState: ->
-    clearTimeout(this.pendingStateTimeoutHandle)
-    this.pendingStateTimeoutHandle = null
-    this.pendingPartialMatches = null
+    clearTimeout(@pendingStateTimeoutHandle)
+    @pendingStateTimeoutHandle = null
+    @pendingPartialMatches = null
 
   # This is called by {::handleKeyboardEvent} when no matching bindings are
   # found for the currently queued keystrokes or by the pending state timeout.

  #
  # Returns a {Disposable} on which `.dispose()` can be called to unsubscribe.
  onDidFailToMatchBinding: (callback) ->
    this.emitter.on 'did-fail-to-match-binding', callback

  # Invoke the given callback when a keymap file is reloaded.
  #


    for event in eventsToReplay
      keyEventOptions.disabledBindings = bindingsToDisable
      @handleKeyboardEvent(event, keyEventOptions)

      # We can safely re-enable the bindings when we no longer have any partial matches
      bindingsToDisable = null if bindingsToDisable? and not @pendingPartialMatches?

    if fromTimeout and @pendingPartialMatches?
      @terminatePendingState(true)

    return

