Might be you need to use getchar() instead I remember getting a similar problem when coding a basic textbox.