bundles/org.eclipse.orion.client.editor/web/orion/editor/textView.js
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();
			}
		}
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();
			}
		}
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 ( ) ; } }
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.
Adds a keyMode to the text view at the specified position .