Input problem

In the code below I am controlling a player ship and there is a problem with not being able to move while holding down the fire button (right control).

Can anyone help please?

	if (Input.GetAxis("Horizontal") == -1)
	{
		shipVelocity.x -= hVelStep * Time.deltaTime * speedMult;
	}
	else if (Input.GetAxis("Horizontal") == 1)
	{
		shipVelocity.x += hVelStep * Time.deltaTime * speedMult;
	}
	else
	{
		shipVelocity.x /= hVelDrag;
	}
	
	if (Input.GetButtonDown("Fire2")  missileCount < maxMissiles  missileTCount > missileTDelay)
	{
		FireMissile();
		missileCount +=1;
		missileTCount = 0.0f;
	}

	if (Input.GetButtonUp("Fire2")) missileTCount = missileTDelay;
	
	missileTCount += 1 * Time.deltaTime;

Has anyone experienced any kind of input problem then? I noticed with some example code I have from a book that it also had a problem with key input not getting registered when more than one key was pressed.

Is this a Unity bug?

I know I’m talking to myself here but :wink:

I’ve figured it out. Once I avoided using the CTRL or ALT keys for the purpose of fire (I changed it to Shift) the problem went away. I’m assuming the OS was kicking in somehow and sending out weird Windows events to mess up the continual key press.