How to say if I press a different key?

if (sText.activeInHierarchy)
{
if (Input.GetKeyDown(KeyCode.S))
{
fin = fin + 1;
sText.SetActive(false);
if (easy == true)
{
EasyMode();
}
if (medium == true)
{
MediumMode();
}
if (hard == true)
{
HardMode();
}
}
else if (!Input.GetKeyDown(KeyCode.S))
{
aSlider.SetActive(false);
sText.SetActive(false);
restart.SetActive(true);
}

        if (aBar.value == restartNum)
        {
            aSlider.SetActive(false);
            sText.SetActive(false);
            restart.SetActive(true);
        }
    }

there is a section of my script above and i need to make it so it fails if i don’t press s small other problem is the extra statement with the ! also makes the letter not activate, the activation part is below

public void EasyMode()
{
easy = true;
timeMultiply = 10;
if (fin < 8)
{
aSlider.SetActive(true);
aBar.value = timerMax;
easyMode.SetActive(false);
ranNum = Random.Range(1, 5);
if (ranNum == 1)
{
Number1();
}
if (ranNum == 2)
{
Number2();
}
if (ranNum == 3)
{
Number3();
}
if (ranNum == 4)
{
Number4();
}
}

void Number2()
{
    //aSlider.SetActive(true);
    timeRemaining = timerMax;
    sText.SetActive(true);
}

You have to check if anyKey gets hold down and additionally that the “s” key gets not hold down. The code is untested.

else if (Input.anyKeyDown && !Input.GetKeyDown(KeyCode.S))
{
     aSlider.SetActive(false);
     sText.SetActive(false);
     restart.SetActive(true);
}