Geting keys ASCII numbers?

What is the easiest way to get a number from the ASCII table when you press a key, for ex. i press A and get 65 in my varibale, i press B and get 66... TIA
Game Editor discussion board
http://game-editor.com/forum/
int lastKey = getLastKey();