Holding two buttons down not working.

Hi, this is the snippet of relevant code:

void Update () {

				if (Input.GetKey (moveRight) && canMove == true) {
						rigidbody2D.velocity = new Vector2 (speed, 0);
				} else if (Input.GetKey (moveLeft) && canMove == true) {
						rigidbody2D.velocity = new Vector2 (speed * -1, 0);
				} else if (Input.GetKey ("space") && canMove == true && canJump == true) {
						rigidbody2D.velocity = new Vector2 (0, jumpHeight);
						this.canJump = false;
				} else if (Input.GetKey (moveRight) && Input.GetKey ("space") && canMove == true && canJump == true){
						rigidbody2D.velocity = new Vector2 (0, jumpHeight);
				} else { rigidbody2D.velocity = new Vector2(0,0);
		}
	}

As you can see I can move and I can jump however I can’t move and jump. From research I know you have to && the move and jump so I have the else if (Input.GetKey (moveRight) && Input.GetKey (“space”) && canMove == true && canJump == true){
rigidbody2D.velocity = new Vector2 (0, jumpHeight);
Where space is my jump button since it gets both keys for move right and jump I would assume I could jump while holding the right arrow but I can’t. As it is right now I have to let go of all keys before I can jump and I do not know why.

Ok since they right key was pressed even as I pressed the space it just saw “yep right key pressed do the first one, keep moving then break out of the if else clauses ignoring the further down ones to jump.” Being the lazy person I am I did not want to change my code too much so I made a simple addition to my first line, I added && !Input.GetKey(“space”) so as soon as space is pressed it does not execute that if statement instead looks further down and executes my jump.