Ok, Editfield1 is the input field for any key press, the following
code is in it's KeyDown event:
Function KeyDown(Key As String) As Boolean
//These tell if a modifier key has been pressed
If Keyboard.AsyncControlKey then EditField3.Text="Control key"
If Keyboard.AsyncOSKey then EditField3.Text="Command key"
If Keyboard.AsyncAltKey then EditField3.Text="Option key"
If Keyboard.AsyncShiftKey then EditField3.Text="Shift key"
EditField2.Text=Str(Asc(Key)) //Gives the ASCII code for the key
pressed
Keycode=?????(Key) //This is where I need help!
EditField4.Text = Keyboard.Keyname( Keycode ) //Gives the names of
special keys
Return False
End Function
Is there a way of doing ' Keycode=?????(Key)' or do I need to map out
all the possible keycodes and make a CASE setup to determine the
correct value fo keycode?
Thank you,
Aubrey
PB G4 OS 10.4.7
RB 2006 Release 3
_______________________________________________
Unsubscribe or switch delivery mode:
<http://www.realsoftware.com/support/listmanager/>
Search the archives of this list here:
<http://support.realsoftware.com/listarchives/lists.html>