code: private void fireControlPress(int index, int controllerIndex) {
  		consumed = false;
  		for (int i=0;i<controllerListeners.size();i++) {
  			ControllerListener listener = (ControllerListener) controllerListeners.get(i);
  			if (listener.isAcceptingInput()) {
  				switch (index) {
  				case LEFT:
  					listener.controllerLeftPressed(controllerIndex);
  					break;
  				case RIGHT:
  					listener.controllerRightPressed(controllerIndex);
  					break;
  				case UP:
  					listener.controllerUpPressed(controllerIndex);
  					break;
  				case DOWN:
  					listener.controllerDownPressed(controllerIndex);
  					break;
  				default:
  					// assume button pressed
  					listener.controllerButtonPressed(controllerIndex, (index - BUTTON1) + 1);
  					break;
  				}
  				if (consumed) {
  					break;
  				}
  			}
  		}
  	}
docs: Fire an event indicating that a control has been pressed
  
  @param index The index of the control pressed
  @param controllerIndex The index of the controller on which the control was pressed