Quote Originally Posted by User137
Quote Originally Posted by cronodragon
Take a look at: http://msdn2.microsoft.com/en-us/library/bb174685.aspx

There is the whole list in order from 0 to 255. Just make you array in such way that it matches those ascii codes, like this:

const
AsciiKey : array[0..255] of Char =
'0', // DIK_0,
'1', // DIK_1,
'2', // DIK_2,
'3', // DIK_3,
'4', // DIK_4,
'5', // DIK_5,
'6', // DIK_6,
'7', // DIK_7,
'8', // DIK_8,
'9', // DIK_9,
'A', // DIK_A,
#0, // DIK_ABNT_C1,
#0, // DIK_ABNT_C2,
... etc

Those with value of #0 don't have ascii code. To convert your codes to Ascii just index the array with the code of which key you are getting a press.
That is unnecessary since chr(byte) already tells what each ascii number means as a letter.
But using those DIK_ values, the code for A would be 10, not 65 as it would be required by Chr() which is just making a typecast, not a translation.