Code example for KeyEvent

Methods: getEventTime

0
            this.lastMenuEventTime = event.getEventTime();
            return super.onKeyUp(keyCode, event);
        } 
        // If search key 
        else if (keyCode == KeyEvent.KEYCODE_SEARCH) {
            this.loadUrl("javascript:cordova.fireDocumentEvent('searchbutton');");
            return true; 
        } 
        else if(keyUpCodes.contains(keyCode))
        { 
            //What the hell should this do? 
            return super.onKeyUp(keyCode, event);
        } 
 
        //Does webkit change this behavior? 
        return super.onKeyUp(keyCode, event);
    } 
 
     
    public void bindButton(boolean override)
    { 
        this.bound = override;
    } 
 
    public void bindButton(String button, boolean override) {
        // TODO Auto-generated method stub 
        if (button.compareTo("volumeup")==0) {
          keyDownCodes.add(KeyEvent.KEYCODE_VOLUME_UP);
        }