Serial read loop not reading \n

Thanks, this was quick...

Changing the condition to use '#' or 'x' does produce a different result; it will enter the 'else' part. Great.

However, is there a way to use the key as line terminator for this function?
Why is

      Serial.print("Received char: ");
      Serial.println(c, HEX);

not repeating the or more so the hex 0D (\n) character?

Re-reading your answer: what is it sending then?
I can enter one or two or more numbers, and nothing happens. But once I hit the input is read.