     switch key
       when 'ctrl'
         keyIdentifier = 'Control'
-        ctrl = true
+        ctrl = true if eventType isnt 'keyup'
       when 'alt'
         keyIdentifier = 'Alt'
-        alt = true
+        alt = true if eventType isnt 'keyup'
       when 'shift'
         keyIdentifier = 'Shift'
-        shift = true
+        shift = true if eventType isnt 'keyup'
       when 'cmd'
         keyIdentifier = 'Meta'
-        cmd = true
+        cmd = true if eventType isnt 'keyup'
       else
         keyIdentifier = key[0].toUpperCase() + key[1..]
 

  key = keyForKeyboardEvent(event, dvorakQwertyWorkaroundEnabled)

  keystroke = ''
  if event.ctrlKey
    keystroke += 'ctrl'
  if event.altKey
    keystroke += '-' if keystroke
    keystroke += 'alt'
  if event.shiftKey
    # Don't push 'shift' when modifying symbolic characters like '{'
    unless /^[^A-Za-z]$/.test(key)
      keystroke += '-' if keystroke
      keystroke += 'shift'
  if event.metaKey
    keystroke += '-' if keystroke
    keystroke += 'cmd'
  if key?
    keystroke += '-' if keystroke
    keystroke += key


  if process.platform in ['linux', 'win32']
    keyIdentifier = translateKeyIdentifierForWindowsAndLinuxChromiumBug(keyIdentifier)

  return keyIdentifier if KeyboardEventModifiers.has(keyIdentifier)

  charCode = charCodeFromKeyIdentifier(keyIdentifier)

