Fixed call to kgetc. Waiting for the user to press the @ key now works.