function KeyboardShortcut(shortcut) {
    var mods = {};
    var ident = '';
    shortcut.split('|').forEach(function(part) {
      var partLc = part.toLowerCase();
      switch (partLc) {
        case 'alt':
        case 'ctrl':
        case 'meta':
        case 'shift':
          mods[partLc + 'Key'] = true;
          break;
        default:
          if (ident)
            throw Error('Invalid shortcut');
          ident = part;
      }
    });

    this.ident_ = ident;
    this.mods_ = mods;
  }
/**
   * This is used to identify keyboard shortcuts.
   * @param {string} shortcut The text used to describe the keys for this
   *     keyboard shortcut.
   * @constructor
   */
This is used to identify keyboard shortcuts.
@param {string} shortcut The text used to describe the keys for this
keyboard shortcut.
@constructor
This is used to identify keyboard shortcuts . @param { string } shortcut The text used to describe the keys for this keyboard shortcut . @constructor
function KeyboardShortcut(shortcut) {
    var mods = {};
    var ident = '';
    shortcut.split('|').forEach(function(part) {
      var partLc = part.toLowerCase();
      switch (partLc) {
        case 'alt':
        case 'ctrl':
        case 'meta':
        case 'shift':
          mods[partLc + 'Key'] = true;
          break;
        default:
          if (ident)
            throw Error('Invalid shortcut');
          ident = part;
      }
    });
    this.ident_ = ident;
    this.mods_ = mods;
  }
function KeyboardShortcut ( shortcut ) { var mods = { } ; var ident = '' ; shortcut . split ( '|' ) . forEach ( function ( part ) { var partLc = part . toLowerCase ( ) ; switch ( partLc ) { case 'alt' : case 'ctrl' : case 'meta' : case 'shift' : mods [ partLc + 'Key' ] = true ; break ; default : if ( ident ) throw Error ( 'Invalid shortcut' ) ; ident = part ; } } ) ; this . ident_ = ident ; this . mods_ = mods ; }
This is used to identify keyboard shortcuts.
This is used to identify keyboard shortcuts .