from interface KeyPressHandler
168431
public void onKeyPress (KeyPressEvent event)
    {
        if (event.getCharCode() == KeyCodes.KEY_ESCAPE) {
            _onEscape.onClick(null);
        }
    }
412156
public static HandlerRegistration bind (HasKeyDownHandlers target, ClickHandler onEnter)
    {
        return target.addKeyDownHandler(new EnterClickAdapter(onEnter));
    }
434581
def keyPressEvent(self, event):
        
        # enter || return keys will apply the command
        if event.key() in (Qt.Key_Return, Qt.Key_Enter):
            self.applyCommand()
            event.accept()
        
        # home key will move the cursor to the home position
        elif event.key() == Qt.Key_Home:
            self.gotoHome()
            event.accept()
        
        elif event.key() in (Qt.Key_Backspace, Qt.Key_Delete):
            super(XConsoleEdit, self).keyPressEvent(event)
            
            # update the completer
            cursor   = self.textCursor()
            text     = projex.text.nativestring(cursor.block().text())
            text     = text[:cursor.columnNumber()].split(' ')[-1]
            
            if not '.' in text:
                self.cancelCompletion()
            
        # period key will trigger a completion popup
        elif event.key() == Qt.Key_Period or \
             (Qt.Key_A <= event.key() <= Qt.Key_Z):
            super(XConsoleEdit, self).keyPressEvent(event)
            self.startCompletion(force=event.key() == Qt.Key_Period)
        
        # space, tab, backspace and delete will cancel the completion
        elif event.key() == Qt.Key_Space:
            self.cancelCompletion()
            super(XConsoleEdit, self).keyPressEvent(event)
        
        # left parenthesis will start method help
        elif event.key() == Qt.Key_ParenLeft:
            self.cancelCompletion()
            self.showMethodToolTip()
            super(XConsoleEdit, self).keyPressEvent(event)
        
        # Ctrl+Up will load previous commands
        elif event.key() == Qt.Key_Up:
            if self.commandLineInteraction() or \
               event.modifiers() & Qt.ControlModifier:
                self.insertPreviousCommand()
                event.accept()
            else:
                super(XConsoleEdit, self).keyPressEvent(event)
        
        # Ctrl+Down will load future commands
        elif event.key() == Qt.Key_Down:
            if self.commandLineInteraction() or \
               event.modifiers() & Qt.ControlModifier:
                self.insertNextCommand()
                event.accept()
            else:
                super(XConsoleEdit, self).keyPressEvent(event)
        
        # otherwise, handle the event like normal
        else:
            super(XConsoleEdit, self).keyPressEvent(event)
472320
function triggerIfHandlers(that, handlerListName, event) {
    triggerIfHandlerList(that[handlerListName][event], event)
    triggerIfHandlerList(that[normalHandlerToAllHandlerProperty(handlerListName)], event)
}
289312
def key_pressed_event(self, event):
        
        if event.key() == self.keys.ESCAPE:
            self.close()

        self.example.key_event(event.key(), self.keys.ACTION_PRESS)
849620
def keyPressEvent( self, event ):
        
        if ( event.key() in (Qt.Key_Enter, Qt.Key_Return) ):
            self.emitSaveRequested()
        
        super(XQueryBuilderWidget, self).keyPressEvent(event)
667419
public static void toggleKeyPad(Context context) {
		InputMethodManager imm = (InputMethodManager) context
				.getSystemService(Context.INPUT_METHOD_SERVICE);
		if (imm != null) {
			imm.toggleSoftInput(InputMethodManager.SHOW_FORCED, 0);
		}
	}
603959
def keyPressEvent(self, event):
        
        if event.key() in (Qt.Key_Enter, Qt.Key_Return):
            self.queryEntered.emit(self.query())
        
        super(XOrbQuickFilterWidget, self).keyPressEvent(event)
1034632
def keyPressEvent(self, ev):
        """"""
        if ev.key() in (Qt.Key_Enter, Qt.Key_Return):
            self._startOrStopEditing()
        elif ev.key() == Qt.Key_Escape:
            self._cancelEditing()
        else:
            Kittens.widgets.ClickableTreeWidget.keyPressEvent(self, ev)
1371634
def keyPressEvent( self, event ):
        
        if ( event.key() == Qt.Key_C and \
             event.modifiers() == Qt.ControlModifier ):
            self.copy()
            event.accept()
            return
            
        elif ( event.key() == Qt.Key_V and \
             event.modifiers() == Qt.ControlModifier ):
            self.paste()
            event.accept()
            return
        
        elif ( event.key() == Qt.Key_Delete ):
            indexes = map(self.row, self.selectedItems())
            for index in reversed(sorted(indexes)):
                self.takeItem(index)
            
            event.accept()
            return
        
        elif event.key() == Qt.Key_Backspace:
            if self.count() > 1:
                self.takeItem(self.count() - 2)
                self.setFocus()
        
        super(XMultiTagEdit, self).keyPressEvent(event)
1353877
public InputHandler getInputHandler()
  {
    if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled())
    {
      SibTr.entry(tc, "getInputHandler");
      SibTr.exit(tc, "getInputHandler", inputHandler);
    }
    
    return inputHandler;
  }
406918
function UI (input, output) {
  this.rl = readline.createInterface({
    input: input || ttys.stdin,
    output: output || ttys.stdout
  })
  
  // Delegated events bind.
  this.onLine = (function onLine () {
    _events.line.apply(this, arguments)
  }).bind(this)
  
  this.onKeypress = (function onKeypress () {
    if (this.rl) {
      _events.keypress.apply(this, arguments)
    }
  }).bind(this)
  
  this.forceClose = this.forceClose.bind(this)
  
  this.rl.addListener('line', this.onLine)
  this.rl.input.addListener('keypress', this.onKeypress)
  
  this.rl.on('SIGINT', this.forceClose)
  process.on('exit', this.forceClose)
}
713985
function keyPressed(e){
            if (e.code === "Escape") {
                if (this.parent !== null) {
                    var p = this.$parentMenu;
                    this.$canceled(this);
                    this.$hideMenu();
                    if (p !== null) {
                        p.requestFocus();
                    }
                }
            } else {
                this.$super(e);
            }
        }
259125
def handle_keypress(self):
        """"""
        if self.numpress == 2:
            self.sig_double_tab_pressed.emit(True)
        self.numpress = 0
560854
public java.lang.String getOnkeypress() {
        return (java.lang.String) getStateHelper().eval(PropertyKeys.onkeypress);

    }
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)
664960
private void initChangeHandler() {
	    JQMChangeHandler handler = new JQMChangeHandler() {
            @Override
            public void onEvent(JQMEvent<?> event) {
                DomEvent.fireNativeEvent(Document.get().createChangeEvent(), input);
            }};
	    JQMHandlerRegistration.registerJQueryHandler(new WidgetHandlerCounter() {
            @Override
            public int getHandlerCountForWidget(GwtEvent.Type<?> type) {
                return getHandlerCount(type);
            }
        }, this, handler, JQMComponentEvents.CHANGE,
        JQMEventFactory.getType(JQMComponentEvents.CHANGE, JQMChangeHandler.class));
	}