code: public KeyEvent getKeyEvent() {
          synchronized (eventLock) {
              if (processedKeyEvent.isEmpty()) {
                  return null;
              } else {
                  return processedKeyEvent.get(processedKeyEvent.size() - 1);
              }
          }
      }
docs: Get the latest key event processed by the {@link GVRCursorController} if
  there is one (not all {@link GVRCursorController} report {@link KeyEvent}
  s). Note that this value will be null if the latest event processed by
  the {@link GVRCursorController} did not contain a {@link KeyEvent}.
  
  Note that this function also returns a null. To get every
  {@link KeyEvent} reported by the {@link GVRCursorController} use the
  {@link IControllerEvent} or the {@link ISensorEvents} listener to
  query for the {@link KeyEvent} whenever a a callback is made.
  
  The {@link KeyEvent} would be valid for the lifetime of that callback and
  would be reset to null on completion.
  
  @return the {@link KeyEvent} or null if there isn't one.