Key Input

Ive written a program that is a console of sorts. I have programmed it to read a keypress, add that character to a buffer (if printable), and then display that buffer. The problem is that when I press a key, the wrong ASCII integer is being created. For example, when I press A without the shift, I should get the value of 97, but I get 65, the CAPITAL A. Also, when I press the tilde key, the quote key, the semicolon key, etc, I don’t get anything because the number being applied isn’t a printable number!!! How do I fix this???

Nevermind, I got it.