Hello heres a Code Example that doesnt prioiritize keys
|| => boolean OR
& => boolean AND
And some handling Code with Methods
void Update () {
this.processInput();
}
private void processInput()
{
if (Input.GetKey(KeyCode.Space))
{
print("Space pressed ## Move UP");
}
rotateLeft();
rotateRight();
}
private void rotateLeft()
{
if (Input.GetKey(KeyCode.A) & !Input.GetKey(KeyCode.D)|| Input.GetKey(KeyCode.A) & !Input.GetKey(KeyCode.D)& Input.GetKey(KeyCode.Space))
{
print("A pressed ## rotate left");
}
}
private void rotateRight()
{
if (Input.GetKey(KeyCode.D) & !Input.GetKey(KeyCode.A)|| Input.GetKey(KeyCode.D) & !Input.GetKey(KeyCode.A) & Input.GetKey(KeyCode.Space))
{
print("D pressed ## rotate right");
}
}