 
 exports.normalizeKeystrokes = (keystrokes) ->
   normalizedKeystrokes = []
-  for keystroke in keystrokes.split(WhitespaceRegex)
+  for keystroke in keystrokes.split(WHITESPACE_REGEX)
     if normalizedKeystroke = normalizeKeystroke(keystroke)
       normalizedKeystrokes.push(normalizedKeystroke)
     else

  return false if userKeystrokeIndex < userKeystrokes.length - 1

  if isPartialMatch and bindingRemainderContainsOnlyKeyups
    KeydownExactMatch
  else if isPartialMatch
    PartialMatch
  else
    ExactMatch

normalizeKeystroke = (keystroke) ->
  if isKeyup = keystroke.startsWith('^')

{calculateSpecificity} = require 'clear-cut'
KeyboardLayout = require 'keyboard-layout'

MODIFIERS = new Set(['ctrl', 'alt', 'shift', 'cmd'])
ENDS_IN_MODIFIER_REGEX = /(ctrl|alt|shift|cmd)$/
WHITESPACE_REGEX = /\s+/
NON_CHARACTER_KEY_NAMES_BY_KEYBOARD_EVENT_KEY = {
  'Control': 'ctrl',
  'Meta': 'cmd',
  'ArrowDown': 'down',
