Serial Servo Control

How does your sketch (which we can't see) decide that no key presses are being received?