Keyboard Input

Im trying to get keyboard input from the user, for one of the game im making. However im not sure how i can do this for the letters on my keyboard. Can you please give me some example code, ty Bimzy