This is a convenience method to set the new QKeySequence of the
        shortcut editor from a string.
355791
def set_sequence_from_str(self, sequence):
        
        self._qsequences = [QKeySequence(s) for s in sequence.split(', ')]
        self.update_warning()
535921
function(){// Shortcuts
var Se=this.words,ke=this.sigBytes;// Clamp
Se[ke>>>2]&=4294967295<<32-8*(ke%4),Se.length=se.ceil(ke/4)}
414285
def onExpandKeyEvent(self, keyEvent):
        """"""
        if self._start is None:
            currentBlockText = self._qpart.textCursor().block().text()
            line = self._qpart.cursorPosition[0]
            visibleColumn = self._realToVisibleColumn(currentBlockText, self._qpart.cursorPosition[1])
            self._start = (line, visibleColumn)
        modifiersWithoutAltShift = keyEvent.modifiers() & ( ~ (Qt.AltModifier | Qt.ShiftModifier))
        newEvent = QKeyEvent(keyEvent.type(),
                             keyEvent.key(),
                             modifiersWithoutAltShift,
                             keyEvent.text(),
                             keyEvent.isAutoRepeat(),
                             keyEvent.count())

        self._qpart.cursorPositionChanged.disconnect(self._reset)
        self._qpart.selectionChanged.disconnect(self._reset)
        super(self._qpart.__class__, self._qpart).keyPressEvent(newEvent)
        self._qpart.cursorPositionChanged.connect(self._reset)
        self._qpart.selectionChanged.connect(self._reset)
494486
def keyPressEvent(self, event):
        
        if event.key() == QtCore.Qt.Key_F5 or \
           (event.key() == QtCore.Qt.Key_E and \
            event.modifiers() == QtCore.Qt.ControlModifier):
            code = str(self._edit.toPlainText())
            scope = self.viewWidget().codeScope()
            
            exec code in scope, scope
        else:
            super(XScriptView, self).keyPressEvent(event)
1342098
def onShortcutUnindentWithBackspace(self):
        
        assert self._qpart.textBeforeCursor().endswith(self.text())

        charsToRemove = len(self._qpart.textBeforeCursor()) % len(self.text())
        if charsToRemove == 0:
            charsToRemove = len(self.text())

        cursor = self._qpart.textCursor()
        cursor.setPosition(cursor.position() - charsToRemove, QTextCursor.KeepAnchor)
        cursor.removeSelectedText()
1122933
def keybinding(attr):
    """"""
    ks = getattr(QKeySequence, attr)
    return from_qvariant(QKeySequence.keyBindings(ks)[0], str)
1058058
private void shortcutChanged(String shortcut, boolean unbind) {
        Set<String> bindings = new HashSet<>();
        bindings.add(shortcut);
        
        for (BaseUIComponent component : componentBindings) {
            CommandUtil.updateShortcuts(component, bindings, unbind);
        }
    }
290466
function (evt) {
    var shortcutPressed = evt.keyCode === 73 && evt.ctrlKey && evt.altKey;
    if (!shortcutPressed) { return; }
    this.openInspector();
  }
222747
def keyevent_to_keyseq(self, event):
        """"""
        self.keyPressEvent(event)
        event.accept()
        return self.keySequence()
110147
function _processOnKeyUp__noWords(evt) {
        let key = evt.keyCode || evt.which;
        let char = String.fromCharCode(key);
        if (key == 13) {
            this._onSelectedCB(this._input.value);
        }else if (/[a-zA-Z0-9-_ ]/.test(char) || key === 8){
            let prefix = this._input.value;
            if (prefix != '')
                this._keyListenerDebounced(prefix);
        }
    }
948897
public static void toggleKeyboard() {
        InputMethodManager imm = ((InputMethodManager) QuickUtils.getContext().getSystemService(Context.INPUT_METHOD_SERVICE));
        imm.toggleSoftInput(0, 0);
    }
435704
public void setKeyValue(String strSection, String key, String value) {
	Map section = getSectionEL(strSection);
	if (section == null) {
	    section = newMap();
	    sections.put(strSection.toLowerCase(), section);
	}
	section.put(key.toLowerCase(), value);
    }
1299272
def create_shortcuts(self):
        """"""
        # --- Configurable shortcuts
        inspect = config_shortcut(self.inspect_current_object, context='Editor',
                                  name='Inspect current object', parent=self)
        set_breakpoint = config_shortcut(self.set_or_clear_breakpoint,
                                         context='Editor', name='Breakpoint',
                                         parent=self)
        set_cond_breakpoint = config_shortcut(
                                    self.set_or_edit_conditional_breakpoint,
                                    context='Editor',
                                    name='Conditional breakpoint',
                                    parent=self)
        gotoline = config_shortcut(self.go_to_line, context='Editor',
                                   name='Go to line', parent=self)
        tab = config_shortcut(lambda: self.tab_navigation_mru(forward=False),
                              context='Editor',
                              name='Go to previous file', parent=self)
        tabshift = config_shortcut(self.tab_navigation_mru, context='Editor',
                                   name='Go to next file', parent=self)
        prevtab = config_shortcut(lambda: self.tabs.tab_navigate(-1),
                                  context='Editor',
                                  name='Cycle to previous file', parent=self)
        nexttab = config_shortcut(lambda: self.tabs.tab_navigate(1),
                                  context='Editor',
                                  name='Cycle to next file', parent=self)
        run_selection = config_shortcut(self.run_selection, context='Editor',
                                        name='Run selection', parent=self)
        new_file = config_shortcut(lambda : self.sig_new_file[()].emit(),
                                   context='Editor', name='New file',
                                   parent=self)
        open_file = config_shortcut(lambda : self.plugin_load[()].emit(),
                                    context='Editor', name='Open file',
                                    parent=self)
        save_file = config_shortcut(self.save, context='Editor',
                                    name='Save file', parent=self)
        save_all = config_shortcut(self.save_all, context='Editor',
                                   name='Save all', parent=self)
        save_as = config_shortcut(lambda : self.sig_save_as.emit(),
                                  context='Editor', name='Save As',
                                  parent=self)
        close_all = config_shortcut(self.close_all_files, context='Editor',
                                    name='Close all', parent=self)
        prev_edit_pos = config_shortcut(lambda : self.sig_prev_edit_pos.emit(),
                                        context="Editor",
                                        name="Last edit location",
                                        parent=self)
        prev_cursor = config_shortcut(lambda : self.sig_prev_cursor.emit(),
                                      context="Editor",
                                      name="Previous cursor position",
                                      parent=self)
        next_cursor = config_shortcut(lambda : self.sig_next_cursor.emit(),
                                      context="Editor",
                                      name="Next cursor position",
                                      parent=self)
        zoom_in_1 = config_shortcut(lambda : self.zoom_in.emit(),
                                      context="Editor",
                                      name="zoom in 1",
                                      parent=self)
        zoom_in_2 = config_shortcut(lambda : self.zoom_in.emit(),
                                      context="Editor",
                                      name="zoom in 2",
                                      parent=self)
        zoom_out = config_shortcut(lambda : self.zoom_out.emit(),
                                      context="Editor",
                                      name="zoom out",
                                      parent=self)
        zoom_reset = config_shortcut(lambda: self.zoom_reset.emit(),
                                      context="Editor",
                                      name="zoom reset",
                                      parent=self)
        close_file_1 = config_shortcut(self.close_file,
                                      context="Editor",
                                      name="close file 1",
                                      parent=self)
        close_file_2 = config_shortcut(self.close_file,
                                      context="Editor",
                                      name="close file 2",
                                      parent=self)
        run_cell = config_shortcut(self.run_cell,
                                      context="Editor",
                                      name="run cell",
                                      parent=self)
        run_cell_and_advance = config_shortcut(self.run_cell_and_advance,
                                      context="Editor",
                                      name="run cell and advance",
                                      parent=self)
        go_to_next_cell = config_shortcut(self.advance_cell,
                                          context="Editor",
                                          name="go to next cell",
                                          parent=self)
        go_to_previous_cell = config_shortcut(lambda: self.advance_cell(reverse=True),
                                              context="Editor",
                                              name="go to previous cell",
                                              parent=self)
        re_run_last_cell = config_shortcut(self.re_run_last_cell,
                                      context="Editor",
                                      name="re-run last cell",
                                      parent=self)
        prev_warning = config_shortcut(lambda: self.sig_prev_warning.emit(),
                                       context="Editor",
                                       name="Previous warning",
                                       parent=self)
        next_warning = config_shortcut(lambda: self.sig_next_warning.emit(),
                                       context="Editor",
                                       name="Next warning",
                                       parent=self)
        split_vertically = config_shortcut(lambda: self.sig_split_vertically.emit(),
                                           context="Editor",
                                           name="split vertically",
                                           parent=self)
        split_horizontally = config_shortcut(lambda: self.sig_split_horizontally.emit(),
                                             context="Editor",
                                             name="split horizontally",
                                             parent=self)
        close_split = config_shortcut(self.close_split,
                                      context="Editor",
                                      name="close split panel",
                                      parent=self)

        # Return configurable ones
        return [inspect, set_breakpoint, set_cond_breakpoint, gotoline, tab,
                tabshift, run_selection, new_file, open_file, save_file,
                save_all, save_as, close_all, prev_edit_pos, prev_cursor,
                next_cursor, zoom_in_1, zoom_in_2, zoom_out, zoom_reset,
                close_file_1, close_file_2, run_cell, run_cell_and_advance,
                go_to_next_cell, go_to_previous_cell, re_run_last_cell,
                prev_warning, next_warning, split_vertically,
                split_horizontally, close_split,
                prevtab, nexttab]
102493
private static Node createNewObjectPatternFromSuccessiveKeys(Node stringKey) {
    Node newPattern = stringKey.getParent().cloneNode(); // copies the JSType
    for (Node next = stringKey.getNext(); next != null; ) {
      Node newKey = next;
      next = newKey.getNext();
      newPattern.addChildToBack(newKey.detach());
    }
    return newPattern;
  }
767932
private void textFieldKeyCodeKeyPressed(java.awt.event.KeyEvent evt) {//GEN-FIRST:event_textFieldKeyCodeKeyPressed
    if (this.buttonEditKeyCode.isSelected()){
      switch(evt.getKeyCode()){
        case KeyEvent.VK_META:
        case KeyEvent.VK_ALT:
        case KeyEvent.VK_SHIFT:
        case KeyEvent.VK_CONTROL: evt.consume();break;
        default:{
          updateCurrentSelectedForKey(evt);
          this.buttonEditKeyCode.setSelected(false);
          this.tableKeyShortcuts.requestFocus();
        }break;
      }
    }
    evt.consume();
  }
1041934
def onShortcutIndentAfterCursor(self):
        
        cursor = self._qpart.textCursor()

        def insertIndent():
            if self.useTabs:
                cursor.insertText('\t')
            else:  # indent to integer count of indents from line start
                charsToInsert = self.width - (len(self._qpart.textBeforeCursor()) % self.width)
                cursor.insertText(' ' * charsToInsert)

        if cursor.positionInBlock() == 0:  # if no any indent - indent smartly
            block = cursor.block()
            self.autoIndentBlock(block, '')

            # if no smart indentation - just insert one indent
            if self._qpart.textBeforeCursor() == '':
                insertIndent()
        else:
            insertIndent()
944372
def _free_shortcut(self, shortcut):
        

        alpha_numbers = '1234567890abcdefghijklmnopqrstuvwxyz'
        elements = self.parser.find('[accesskey]').list_results()
        found = False
        for element in elements:
            shortcuts = element.get_attribute('accesskey').lower()
            if CommonFunctions.in_list(shortcuts, shortcut):
                for key in alpha_numbers:
                    found = True
                    for element_with_shortcuts in elements:
                        shortcuts = element_with_shortcuts.get_attribute(
                            'accesskey'
                        ).lower()
                        if CommonFunctions.in_list(shortcuts, key):
                            found = False
                            break
                    if found:
                        element.set_attribute('accesskey', key)
                        break
                if found:
                    break