While(....) not working in ISR

In the following code:

void SlowDown()
  {
    while (digitalRead(7) == LOW)
      {
        LeftWing.Decrement(1);
        //Serial.println("Slow Down");
      }
      return;
  }

called from ISR routine:

void KeyRead()
  {
    //Serial.println("ISR Entered");
    if (digitalRead(8) == LOW)
      {
        FastDown();
      }
    else if (digitalRead(7) == LOW)
      {
        SlowDown();
      }
    else if (digitalRead(6) == LOW)
      {
        SlowUp();
      }
    else if (digitalRead(5) == LOW)
      {
        FastUp();
      }
  }

I lock up and never return from the ISR.
It makes no difference if the While is in the proceedure KeyRead or any function called by KeyRead. I have tried many permutations all with the same result. The ISR works fine without the while loop.

That's because digitalRead(7) always returns LOW (pin 7 stays low).

You're doing it wrong.

Interrupts are intended to handle time-critical input events, not to sit there waiting while some external device responds. Do as little as possible in your ISR - preferably just set a flag that you loop() can check and know it has to deal with the event.

So you are saying move the key monitoring to a subroutine that aborts on the missing flag.

What's LeftWing.Decrement(1)? A function that subtracts 1 from a variable?

Is that variable declared volatile?

The flag set method works. I don't clearly understand why the ISR couldn't handle it directly unless some function mechanism in the do and while loops requres the same cpu resource that the interrupt disables. Which of course is a mu point, I now know what I cannot do and what I can.