function keystrokeToString(e) {
    let output = [];
    // TODO(devlin): Should this be i18n'd?
    if (cr.isMac && e.metaKey)
      output.push('Command');
    if (cr.isChromeOS && e.metaKey)
      output.push('Search');
    if (e.ctrlKey)
      output.push('Ctrl');
    if (!e.ctrlKey && e.altKey)
      output.push('Alt');
    if (e.shiftKey)
      output.push('Shift');

    let keyCode = e.keyCode;
    if (isValidKeyCode(keyCode)) {
      if ((keyCode >= 'A'.charCodeAt(0) && keyCode <= 'Z'.charCodeAt(0)) ||
          (keyCode >= '0'.charCodeAt(0) && keyCode <= '9'.charCodeAt(0))) {
        output.push(String.fromCharCode(keyCode));
      } else {
        switch (keyCode) {
          case Key.Comma:
            output.push('Comma');
            break;
          case Key.Del:
            output.push('Delete');
            break;
          case Key.Down:
            output.push('Down');
            break;
          case Key.End:
            output.push('End');
            break;
          case Key.Home:
            output.push('Home');
            break;
          case Key.Ins:
            output.push('Insert');
            break;
          case Key.Left:
            output.push('Left');
            break;
          case Key.MediaNextTrack:
            output.push('MediaNextTrack');
            break;
          case Key.MediaPlayPause:
            output.push('MediaPlayPause');
            break;
          case Key.MediaPrevTrack:
            output.push('MediaPrevTrack');
            break;
          case Key.MediaStop:
            output.push('MediaStop');
            break;
          case Key.PageDown:
            output.push('PageDown');
            break;
          case Key.PageUp:
            output.push('PageUp');
            break;
          case Key.Period:
            output.push('Period');
            break;
          case Key.Right:
            output.push('Right');
            break;
          case Key.Space:
            output.push('Space');
            break;
          case Key.Tab:
            output.push('Tab');
            break;
          case Key.Up:
            output.push('Up');
            break;
        }
      }
    }

    return output.join('+');
  }
/**
   * Converts a keystroke event to string form, ignoring invalid extension
   * commands.
   * @param {!KeyboardEvent} e
   * @return {string} The keystroke as a string.
   */
Converts a keystroke event to string form, ignoring invalid extension
commands.
@param {!KeyboardEvent} e
@return {string} The keystroke as a string.
Converts a keystroke event to string form ignoring invalid extension commands . @param { !KeyboardEvent } e @return { string } The keystroke as a string .
function keystrokeToString(e) {
    let output = [];
    if (cr.isMac && e.metaKey)
      output.push('Command');
    if (cr.isChromeOS && e.metaKey)
      output.push('Search');
    if (e.ctrlKey)
      output.push('Ctrl');
    if (!e.ctrlKey && e.altKey)
      output.push('Alt');
    if (e.shiftKey)
      output.push('Shift');
    let keyCode = e.keyCode;
    if (isValidKeyCode(keyCode)) {
      if ((keyCode >= 'A'.charCodeAt(0) && keyCode <= 'Z'.charCodeAt(0)) ||
          (keyCode >= '0'.charCodeAt(0) && keyCode <= '9'.charCodeAt(0))) {
        output.push(String.fromCharCode(keyCode));
      } else {
        switch (keyCode) {
          case Key.Comma:
            output.push('Comma');
            break;
          case Key.Del:
            output.push('Delete');
            break;
          case Key.Down:
            output.push('Down');
            break;
          case Key.End:
            output.push('End');
            break;
          case Key.Home:
            output.push('Home');
            break;
          case Key.Ins:
            output.push('Insert');
            break;
          case Key.Left:
            output.push('Left');
            break;
          case Key.MediaNextTrack:
            output.push('MediaNextTrack');
            break;
          case Key.MediaPlayPause:
            output.push('MediaPlayPause');
            break;
          case Key.MediaPrevTrack:
            output.push('MediaPrevTrack');
            break;
          case Key.MediaStop:
            output.push('MediaStop');
            break;
          case Key.PageDown:
            output.push('PageDown');
            break;
          case Key.PageUp:
            output.push('PageUp');
            break;
          case Key.Period:
            output.push('Period');
            break;
          case Key.Right:
            output.push('Right');
            break;
          case Key.Space:
            output.push('Space');
            break;
          case Key.Tab:
            output.push('Tab');
            break;
          case Key.Up:
            output.push('Up');
            break;
        }
      }
    }
    return output.join('+');
  }
function keystrokeToString ( e ) { let output = [ ] ; if ( cr . isMac && e . metaKey ) output . push ( 'Command' ) ; if ( cr . isChromeOS && e . metaKey ) output . push ( 'Search' ) ; if ( e . ctrlKey ) output . push ( 'Ctrl' ) ; if ( ! e . ctrlKey && e . altKey ) output . push ( 'Alt' ) ; if ( e . shiftKey ) output . push ( 'Shift' ) ; let keyCode = e . keyCode ; if ( isValidKeyCode ( keyCode ) ) { if ( ( keyCode >= 'A' . charCodeAt ( 0 ) && keyCode <= 'Z' . charCodeAt ( 0 ) ) || ( keyCode >= '0' . charCodeAt ( 0 ) && keyCode <= '9' . charCodeAt ( 0 ) ) ) { output . push ( String . fromCharCode ( keyCode ) ) ; } else { switch ( keyCode ) { case Key . Comma : output . push ( 'Comma' ) ; break ; case Key . Del : output . push ( 'Delete' ) ; break ; case Key . Down : output . push ( 'Down' ) ; break ; case Key . End : output . push ( 'End' ) ; break ; case Key . Home : output . push ( 'Home' ) ; break ; case Key . Ins : output . push ( 'Insert' ) ; break ; case Key . Left : output . push ( 'Left' ) ; break ; case Key . MediaNextTrack : output . push ( 'MediaNextTrack' ) ; break ; case Key . MediaPlayPause : output . push ( 'MediaPlayPause' ) ; break ; case Key . MediaPrevTrack : output . push ( 'MediaPrevTrack' ) ; break ; case Key . MediaStop : output . push ( 'MediaStop' ) ; break ; case Key . PageDown : output . push ( 'PageDown' ) ; break ; case Key . PageUp : output . push ( 'PageUp' ) ; break ; case Key . Period : output . push ( 'Period' ) ; break ; case Key . Right : output . push ( 'Right' ) ; break ; case Key . Space : output . push ( 'Space' ) ; break ; case Key . Tab : output . push ( 'Tab' ) ; break ; case Key . Up : output . push ( 'Up' ) ; break ; } } } return output . join ( '+' ) ; }
Converts a keystroke event to string form, ignoring invalid extension
 commands.
Converts a keystroke event to string form ignoring invalid extension commands .
// TODO(devlin): Should this be i18n'd?