 
   # Finds all key bindings whose keystrokes match the given keystrokes. Returns
   # both partial and exact matches.
-  findMatchCandidates: (keystrokes) ->
+  findMatchCandidates: (keystrokeArray) ->
     partialMatchCandidates = []
     exactMatchCandidates = []
 
-    keystrokesWithSpace = keystrokes + ' '
-
     for binding in @keyBindings when binding.enabled
-      if binding.keystrokes is keystrokes
+      doesMatch = keystrokesMatch(binding.keystrokeArray, keystrokeArray)
+      if doesMatch is 'exact'
         exactMatchCandidates.push(binding)
-      else if binding.keystrokes.indexOf(keystrokesWithSpace) is 0
+      else if doesMatch is 'partial'
         partialMatchCandidates.push(binding)
     {partialMatchCandidates, exactMatchCandidates}
 

{Emitter, Disposable, CompositeDisposable} = require 'event-kit'
KeyBinding = require './key-binding'
CommandEvent = require './command-event'
{normalizeKeystrokes, keystrokeForKeyboardEvent, isAtomModifier, keydownEvent, keyupEvent, characterForKeyboardEvent} = require './helpers'

Platforms = ['darwin', 'freebsd', 'linux', 'sunos', 'win32']
OtherPlatforms = Platforms.filter (platform) -> platform isnt process.platform

    # First screen for any bindings that match the current keystrokes,
    # regardless of their current selector. Matching strings is cheaper than
    # matching selectors.
    {partialMatchCandidates, exactMatchCandidates} = @findMatchCandidates(@queuedKeystrokes)
    partialMatches = @findPartialMatches(partialMatchCandidates, target)

    # Determine if the current keystrokes match any bindings *exactly*. If we
