Del or Backspace pressed. Delete selection
330473
def delete(self):
        """"""
        with self._qpart:
            for cursor in self.cursors():
                if cursor.hasSelection():
                    cursor.deleteChar()
787859
def undobutton_action(self):
        
        if len(self.history) > 1:
            old = self.history.pop(-1)
            self.selection_array = old
            self.mask.set_data(old)
            self.fig.canvas.draw_idle()
155831
def backward_delete_char(event):
    "  "
    if event.arg < 0:
        # When a negative argument has been given, this should delete in front
        # of the cursor.
        deleted = event.current_buffer.delete(count=-event.arg)
    else:
        deleted = event.current_buffer.delete_before_cursor(count=event.arg)

    if not deleted:
        event.cli.output.bell()
579846
function onMouseMove(event)  {
  project.deselectAll();

  if (event.item) {
    event.item.selected = true;
  }
}
434092
def backspace!
      if @col > 0
        left, cursor, right = abbrev_segments
        @abbrev = left.chop! + cursor + right
        @col -= 1
        redraw
      end
    end
1121519
function fixCut() {
			if ( !CKEDITOR.env.ie || CKEDITOR.env.quirks )
				return;

			var sel = editor.getSelection(),
				control, range, dummy;

			if ( ( sel.getType() == CKEDITOR.SELECTION_ELEMENT ) && ( control = sel.getSelectedElement() ) ) {
				range = sel.getRanges()[ 0 ];
				dummy = editor.document.createText( '' );
				dummy.insertBefore( control );
				range.setStartBefore( dummy );
				range.setEndAfter( control );
				sel.selectRanges( [ range ] );

				// Clear up the fix if the paste wasn't succeeded.
				setTimeout( function() {
					// Element still online?
					if ( control.getParent() ) {
						dummy.remove();
						sel.selectElement( control );
					}
				}, 0 );
			}
		}
836492
def delete_selection(self, selection=None):
        

        # Mark content as changed
        post_command_event(self.main_window, self.ContentChangedMsg)

        if selection is None:
            selection = self.get_selection()

        current_table = self.grid.current_table

        for row, col, tab in self.grid.code_array.dict_grid.keys():
            if tab == current_table and (row, col) in selection:
                self.grid.actions.delete_cell((row, col, tab))

        self.grid.code_array.result_cache.clear()
249447
def OnChar(self, event):
        """"""

        key = event.GetKeyCode()

        if key < wx.WXK_SPACE or key == wx.WXK_DELETE or key > 255 or \
           chr(key) in string.digits:
            event.Skip()
224559
def cut(self):
        
        cursorPos = self._qpart.cursorPosition
        topLeft = (min(self._start[0], cursorPos[0]),
                   min(self._start[1], cursorPos[1]))
        self.copy()
        self.delete()

        """Move cursor to top-left corner of the selection,
        so that if text gets pasted again, original text will be restored"""
        self._qpart.cursorPosition = topLeft
337463
def backspace(self):
        
        if self._cx + self._cw >= 0:
            self.erase()
            self._cx -= self._cw

        self.flush()
96154
function resetInput(cm, typing) {
    if (cm.display.contextMenuPending) return;
    var minimal, selected, doc = cm.doc;
    if (cm.somethingSelected()) {
      cm.display.prevInput = "";
      var range = doc.sel.primary();
      minimal = hasCopyEvent &&
        (range.to().line - range.from().line > 100 || (selected = cm.getSelection()).length > 1000);
      var content = minimal ? "-" : selected || cm.getSelection();
      cm.display.input.value = content;
      if (cm.state.focused) selectInput(cm.display.input);
      if (ie && ie_version >= 9) cm.display.inputHasSelection = content;
    } else if (!typing) {
      cm.display.prevInput = cm.display.input.value = "";
      if (ie && ie_version >= 9) cm.display.inputHasSelection = null;
    }
    cm.display.inaccurateSelection = minimal;
  }
720888
def unindent_selection(self, cursor):
        
        doc = self.editor.document()
        tab_len = self.editor.tab_length
        nb_lines = len(cursor.selection().toPlainText().splitlines())
        if nb_lines == 0:
            nb_lines = 1
        block = doc.findBlock(cursor.selectionStart())
        assert isinstance(block, QtGui.QTextBlock)
        i = 0
        _logger().debug('unindent selection: %d lines', nb_lines)
        while i < nb_lines:
            txt = block.text()[self.min_column:]
            _logger().debug('line to unindent: %s', txt)
            _logger().debug('self.editor.use_spaces_instead_of_tabs: %r',
                            self.editor.use_spaces_instead_of_tabs)
            if self.editor.use_spaces_instead_of_tabs:
                indentation = len(txt) - len(txt.lstrip())
            else:
                indentation = len(txt) - len(txt.replace('\t', ''))
            _logger().debug('unindent line %d: %d spaces (min indent=%d)', i, indentation, self.min_column)
            if indentation > 0:
                c = QtGui.QTextCursor(block)
                c.movePosition(c.StartOfLine, cursor.MoveAnchor)
                c.movePosition(c.Right, cursor.MoveAnchor, indentation + self.min_column)
                max_spaces = indentation % tab_len
                if max_spaces == 0:
                    max_spaces = tab_len
                spaces = self.count_deletable_spaces(c, max_spaces)
                for _ in range(spaces):
                    c.deletePreviousChar()
            block = block.next()
            i += 1
        return cursor
1221304
function cleanSelector (o) {
	var a = o.replace(/\s*,\s*/g, ",").replace(/\n/g, "").split(',');

	a = a.filter( function( item, index, inputArray ) {
		return inputArray.indexOf(item) == index;
	});

	return a.join(',\n');
}
1209898
function(event) {
		var datalistSelect = event.target,
			datalist = datalistSelect.parentNode,
			input = dcmnt.querySelector('input[list="' + datalist.id + '"]');

		// Check for whether the events target was a select or whether the input doesn't exist
		if (datalistSelect.tagName.toLowerCase() !== 'select' || input === null) {
			return;
		}

		// Determine a relevant key - either printable characters (that would have a length of 1) or controlling like Backspace
		if (event.key && (event.key === 'Backspace' || event.key.length === 1)) {
			input.focus();

			if (event.key === 'Backspace') {
				input.value = input.value.substr(0, input.value.length - 1);

				// Dispatch the input event on the related input[list]
				dispatchInputEvent(input);
			} else {
				input.value += event.key;
			}

			prepOptions(datalist, input);
		}
	}
619254
def handle_keyrelease(self, event):
        
        if event.keysym == "BackSpace":
            self.delete(self.index(tk.INSERT), tk.END)
            self.position = self.index(tk.END)
        if event.keysym == "Left":
            if self.position < self.index(tk.END):  # delete the selection
                self.delete(self.position, tk.END)
            else:
                self.position -= 1  # delete one character
                self.delete(self.position, tk.END)
        if event.keysym == "Right":
            self.position = self.index(tk.END)  # go to end (no selection)
        if event.keysym == "Return":
            self.handle_return(None)
            return
        if len(event.keysym) == 1:
            self.autocomplete()
985760
def deleteSelected(self):
        ''
        ndeleted = self.deleteBy(self.isSelected)
        nselected = len(self._selectedRows)
        self._selectedRows.clear()
        if ndeleted != nselected:
            error('expected %s' % nselected)
1022646
def _handleDelete(self):
        
        if self.cursorPos < len(self.inputBuffer):
            self.inputBuffer = self.inputBuffer[0:self.cursorPos] + self.inputBuffer[self.cursorPos+1:]                        
            self._refreshInputPrompt(len(self.inputBuffer)+1)