GETKEY()
Returns: a string of one character length which is the last key or button pressed. Certain events also produce GetKey sequences.
Description
Returns the last key or button pressed as a one-character string value. See the example below for the values which are returned. See the SpecEvent.prj sample in the Samples folder. SpecEvent also shows how to recognize the Palm 5 Way buttonTo see the raw characters codes that come in from events, you can also use the SysInfo(9), SysInfo(10) and SysInfo(11) calls.
Example
In the Form Event Code of a form, use this:
dim key as string
If Not GetEventType()=NSBKeyOrButton then Exit Sub
key=getKey()
Select Case asc(key)
Case 200
t=skey + " " + "Palm 5Way released"
Case 204
t=skey + " " + "Palm 5Way Left"
Case 208
t=skey + " " + "Palm 5Way Right"
Case 216
t=skey + " " + "Palm 5Way Select"
Case 29
t=skey + " " + "Alpha Keyboard"
Case 30
t=skey + " " + "Numeric Keyboard"
Case 31
t=skey + " " + "Contrast"
Case 32
t=skey + " " + "Silkscreen Clock"
Case 33
t=skey + " " + "Virtual Clock"
Case 34
t=skey + " " + "Brightness"
Case 40
t=skey + " " + "Camera Shutter"
Case Else
t=skey + " " + "Palm key code"
End Select