code: function(mode, index) {
  			var keyModes = this._keyModes;
  			if (index !== undefined) {
  				keyModes.splice(index, 0, mode);
  			} else {
  				keyModes.push(mode);
  			}
  			//TODO: API needed for this
  			if (mode._modeAdded) {
  				mode._modeAdded();
  			}
  		}
docs: Adds a keyMode to the text view at the specified position.
  
  @param {orion.editor.KeyMode} mode the editor keyMode.
  @param {Number} [index=length] the index.