If the user tries to clear a keybinding with the backspace
        key this callback will be called and it just fill the model
        with an empty key and set the 'disabled' string in dconf path.
779272
def on_accel_cleared(self, cellrendereraccel, path):
        
        dconf_path = self.store[path][HOTKET_MODEL_INDEX_DCONF]

        if dconf_path == "show-hide":
            # cannot disable 'show-hide' hotkey
            log.warn("Cannot disable 'show-hide' hotkey")
            self.settings.keybindingsGlobal.set_string(dconf_path, old_accel)
        else:
            self.store[path][HOTKET_MODEL_INDEX_HUMAN_ACCEL] = ""
            self.store[path][HOTKET_MODEL_INDEX_ACCEL] = "None"
            if dconf_path == "show-focus":
                self.settings.keybindingsGlobal.set_string(dconf_path, 'disabled')
            else:
                self.settings.keybindingsLocal.set_string(dconf_path, 'disabled')
578390
def cleanup_key(name):
    
    name = name.lstrip('+')
    is_keypad = name.startswith('KP_')
    for mod in ('Meta_', 'Control_', 'dead_', 'KP_'):
        if name.startswith(mod):
            name = name[len(mod):]

    # Dumpkeys is weird like that.
    if name == 'Remove':
        name = 'Delete'
    elif name == 'Delete':
        name = 'Backspace'

    if name.endswith('_r'):
        name = 'right ' + name[:-2]
    if name.endswith('_l'):
        name = 'left ' + name[:-2]


    return normalize_name(name), is_keypad
1163782
def _on_key_pressed(self, event):
        
        delete_request = event.key() in [QtCore.Qt.Key_Backspace,
                                         QtCore.Qt.Key_Delete]
        if event.text() or delete_request:
            cursor = self.editor.textCursor()
            if cursor.hasSelection():
                # change selection to encompass the whole scope.
                positions_to_check = cursor.selectionStart(), cursor.selectionEnd()
            else:
                positions_to_check = (cursor.position(), )
            for pos in positions_to_check:
                block = self.editor.document().findBlock(pos)
                th = TextBlockHelper()
                if th.is_fold_trigger(block) and th.is_collapsed(block):
                    self.toggle_fold_trigger(block)
                    if delete_request and cursor.hasSelection():
                        scope = FoldScope(self.find_parent_scope(block))
                        tc = TextHelper(self.editor).select_lines(*scope.get_range())
                        if tc.selectionStart() > cursor.selectionStart():
                            start = cursor.selectionStart()
                        else:
                            start = tc.selectionStart()
                        if tc.selectionEnd() < cursor.selectionEnd():
                            end = cursor.selectionEnd()
                        else:
                            end = tc.selectionEnd()
                        tc.setPosition(start)
                        tc.setPosition(end, tc.KeepAnchor)
                        self.editor.setTextCursor(tc)
572025
def set_unbind(self):
        
        IntegerEntry.set_unbind(self)
        self.unbind('<Button-1>')
        self.unbind('<Button-3>')
        self.unbind('<Up>')
        self.unbind('<Down>')
        self.unbind('<Enter>')
        self.unbind('<Next>')
        self.unbind('<Prior>')
255840
function _callbackAndReset(e) {
      _fireCallback.call(this, callback, e, combo);

      // we should ignore the next key up if the action is key down
      // or keypress.  this is so if you finish a sequence and
      // release the key the final key will not trigger a keyup
      if (action !== 'keyup') {
        this._ignoreNextKeyup = _characterFromEvent(e);
      }

      // weird race condition if a sequence ends with the key
      // another sequence begins with
      setTimeout(_resetSequences.bind(this), 10);
    }
66887
def _on_key_pressed(self, event):
        
        if (int(event.modifiers()) & QtCore.Qt.ControlModifier > 0 and
                not int(event.modifiers()) & QtCore.Qt.ShiftModifier):
            if event.key() == QtCore.Qt.Key_0:
                self.editor.reset_zoom()
                event.accept()
            if event.key() == QtCore.Qt.Key_Plus:
                self.editor.zoom_in()
                event.accept()
            if event.key() == QtCore.Qt.Key_Minus:
                self.editor.zoom_out()
                event.accept()
858185
function keyDownCallback (event) {
        if (this._hasPlaceholder) {
            if (!ariaUtilsArray.contains(specialKeys, event.keyCode)) {
                this._removePlaceholder();
            } else {
                event.preventDefault();
            }
        }
    }
197377
function addonsManager_clearSearchField() {
    var textbox = this.getElement({type: "search_textbox"});
    var cmdKey = utils.getEntity(this.dtds, "selectAllCmd.key");

    this._controller.keypress(textbox, cmdKey, {accelKey: true});
    this._controller.keypress(textbox, 'VK_DELETE', {});
  }
8440
def backspace(self, n=1, interval=0, pre_dl=None, post_dl=None):
        
        self.delay(pre_dl)
        self.k.tap_key(self.k.backspace_key, n, interval)
        self.delay(post_dl)
872907
function removeMethod (char, method) {
  if (!hasKeybinding(char, method)) return;
  var fnIndex = bindings[char].methods.indexOf(method);
  window.removeEventListener('keyup', bindings[char].listeners[fnIndex]);
  bindings[char].methods.splice(fnIndex, 1);
  bindings[char].listeners.splice(fnIndex, 1);

  if (!bindings[char].methods.length) {
    delete bindings[char];
  } else if (fnIndex === 0) {
    window.addEventListener('keyup', bindings[char].listeners[0]);
  }
}
1046615
function(e) {
      var t = this;

      // Make view options changes immediately on keydown
      // Note: Don't be so aggressive with monitor initParams, because that
      // could result in backend round-trips for each keystroke.
      setTimeout(function(){
        t.viewOptionBinder._onElChanged(e);
      },0);

      // Call the parent keydown
      t.onKeydown(e);
    }
792359
private void keyTyped(KeyEvent event) {
        String text = event.getCharacter();
        int n = text.length();

        if(n == 0) {
            return;
        }

        view.replaceSelection(text);
    }
1079830
public void clearTemporaryKeyField()
    {
        Record record = this.getOwner();
        KeyArea keyArea = record.getKeyArea(0);
        if (keyArea.getKeyFields(false, true) == 2)
            if (m_fakeKeyField != null) // Always
                keyArea.removeKeyField(m_fakeKeyField);
    }
839096
function todoKeyPressed(todo, event) {
    if (event.keyCode === ENTER_KEY) {
      var inputEditTodo = document.getElementById('input_' + todo._id);
      inputEditTodo.blur();
    }
  }
280593
function (mode) {
			var keyModes = this._keyModes;
			for (var i=0; i<keyModes.length; i++) {
				if (keyModes[i] === mode) {
					keyModes.splice(i, 1);
					break;
				}
			}
			//TODO: API needed for this
			if (mode._modeRemoved) {
				mode._modeRemoved();
			}
		}
61805
function emptyEditorOnDeleteEverything() {
        function isEverythingSelected(editor) {
          var caretWalker = new CaretWalker(editor.getBody());
          var rng = editor.selection.getRng();
          var startCaretPos = CaretPosition.fromRangeStart(rng);
          var endCaretPos = CaretPosition.fromRangeEnd(rng);
          var prev = caretWalker.prev(startCaretPos);
          var next = caretWalker.next(endCaretPos);

          return !editor.selection.isCollapsed() &&
            (!prev || (prev.isAtStart() && startCaretPos.isEqual(prev))) &&
            (!next || (next.isAtEnd() && startCaretPos.isEqual(next)));
        }

        // Type over case delete and insert this won't cover typeover with a IME but at least it covers the common case
        editor.on('keypress', function (e) {
          if (!isDefaultPrevented(e) && !selection.isCollapsed() && e.charCode > 31 && !VK.metaKeyPressed(e)) {
            if (isEverythingSelected(editor)) {
              e.preventDefault();
              editor.setContent(String.fromCharCode(e.charCode));
              editor.selection.select(editor.getBody(), true);
              editor.selection.collapse(false);
              editor.nodeChanged();
            }
          }
        });

        editor.on('keydown', function (e) {
          var keyCode = e.keyCode;

          if (!isDefaultPrevented(e) && (keyCode == DELETE || keyCode == BACKSPACE)) {
            if (isEverythingSelected(editor)) {
              e.preventDefault();
              editor.setContent('');
              editor.nodeChanged();
            }
          }
        });
      }
308656
public void dropKeyspace(DBConn dbConn, String keyspace) {
        m_logger.info("Deleting Keyspace '{}'", keyspace);
        try {
            dbConn.getClientSession().system_drop_keyspace(keyspace);
            waitForSchemaPropagation(dbConn);
        } catch (Exception ex) {
            String errMsg = "Failed to delete Keyspace '" + keyspace + "'"; 
            m_logger.error(errMsg, ex);
            throw new RuntimeException(errMsg, ex);
        }
    }