Here is an example, reworked from the Language Reference
Sub KeyDown(key as string) as boolean
//note that 'key' is a string - the binary representation of single character
// Key is converted to an ordinal representation using Asc(key)
Select Case key.Asc
Case &h0D //Return key pressed
Case &h03 //Enter key on numeric keypad pressed
Case &h20 //Space bar pressed
I think using the hex literal notation (&h00) is confusing in this instance. I used hex literals in the example to help highlight where you have misunderstood. Plain old decimal 13, 3, 32 works just as well.
I find the quickest way to find the right number is to test it yourself.
Sub KeyDown( key as string) as boolean
dim ch as integer = key.Asc
TextArea1.AppendText "You pressed the key " + Str(ch) + EndOfLine