code: public boolean dispatchKeyEvent (KeyEvent e)
      {
          int lsize = _listeners.size();
  
          switch (e.getID()) {
          case KeyEvent.KEY_TYPED:
              // dispatch to all the global listeners
              for (int ii = 0; ii < lsize; ii++) {
                  _listeners.get(ii).keyTyped(e);
              }
  
              // see if a chat grabber needs to grab it
              if (_curChatGrabber != null)  {
                  Component target = e.getComponent();
                  // if the key was typed on a non-text component or one
                  // that wasn't editable...
                  if (isChatCharacter(e.getKeyChar()) &&
                      !isTypeableTarget(target)) {
                      // focus our grabby component, and redirect this
                      // key event there
                      _curChatGrabber.requestFocusInWindow();
                      KeyboardFocusManager.getCurrentKeyboardFocusManager().
                          redispatchEvent(_curChatGrabber, e);
                      return true;
                  }
              }
              break;
  
          case KeyEvent.KEY_PRESSED:
              if (lsize > 0) {
                  for (int ii = 0; ii < lsize; ii++) {
                      _listeners.get(ii).keyPressed(e);
                  }
                  // remember the key event..
                  _downKeys.put(e.getKeyCode(), e);
              }
              break;
  
          case KeyEvent.KEY_RELEASED:
              if (lsize > 0) {
                  for (int ii = 0; ii < lsize; ii++) {
                      _listeners.get(ii).keyReleased(e);
                  }
                  // forget the key event
                  _downKeys.remove(e.getKeyCode());
              }
              break;
          }
  
          return false;
      }
docs: documentation inherited from interface KeyEventDispatcher