private void handleKey(int keyCode, boolean pressed) {
		for (int i = 0; i < axis.length; ++i) {
			if (keyCode == this.axis[i]) {
				this.keyStates[i] = pressed;
			}
		}
		
		if (keyCode == this.axis[0] || keyCode == this.axis[1]) {
			if (this.keyStates[0] && this.keyStates[1] || !this.keyStates[0] && !this.keyStates[1]) {
				this.evtSrv.dispatchEvent(new ControllerComponent.HorizontalUpdateEvent(this.entityId, 0.0));
			} else if (keyStates[0]) {
				this.evtSrv.dispatchEvent(new ControllerComponent.HorizontalUpdateEvent(this.entityId, -1.0));				
			} else {
				this.evtSrv.dispatchEvent(new ControllerComponent.HorizontalUpdateEvent(this.entityId, 1.0));								
			}
		} else if (keyCode == axis[2] || keyCode == this.axis[3]) {
			if (this.keyStates[2] && this.keyStates[3] || !this.keyStates[2] && !this.keyStates[3]) {
				this.evtSrv.dispatchEvent(new ControllerComponent.VerticalUpdateEvent(this.entityId, 0.0));
			} else if (keyStates[3]) {
				this.evtSrv.dispatchEvent(new ControllerComponent.VerticalUpdateEvent(this.entityId, -1.0));				
			} else {
				this.evtSrv.dispatchEvent(new ControllerComponent.VerticalUpdateEvent(this.entityId, 1.0));								
			}
		} else {
			int idx = this.buttons.indexOf(keyCode);
			if (idx >= 0) {
				this.evtSrv.dispatchEvent(new ControllerComponent.ButtonlUpdateEvent(this.entityId, pressed, idx));
			}
		}
	}