code: private void update()
      {
          boolean hasEvents = false;
          // set the newly received key and motion events.
          synchronized (eventLock)
          {
              hasEvents = (keyEvent.size() > 0) || (motionEvent.size() > 0);
              processedKeyEvent.addAll(keyEvent);
              keyEvent.clear();
              processedMotionEvent.addAll(motionEvent);
              motionEvent.clear();
          }
          previousActive = active;
          if ((scene != null) && (mPicker != null))
          {
              updatePicker(getMotionEvent(), active);
          }
          context.getEventManager().sendEvent(this, IControllerEvent.class, "onEvent", this, active);
  
          // reset the set key and motion events.
          synchronized (eventLock)
          {
              processedKeyEvent.clear();
              processedMotionEvent.clear();
          }
      }
docs: Process the input data.