getting the Pressed Key in the KeyPress event

Cableguy

Expert
Licensed User
Longtime User
Hi,

Been playing around with the door lib, trying to make sense of it, and how to expose some controls events...

I've been able to expose a keypress event, but how can I know what key was pressed...
I want to be able to "read the hole keyboard...
 

agraham

Expert
Licensed User
Longtime User
Look in the Door help for Event.Data. That's got the EventArgs for the event in it. Google for its members.
B4X:
Sub KeyPressEvent_NewEvent
    o.Value =KeyPressEvent.Data 'Get the event's KeyPressEventArgs
    KeyChar = o.GetProperty("KeyChar ") 'Returns the character
End Sub
You will get more information from the KeyUp or KeyDown events which return a KeyEventArgs object - more Googling :)
 

Cableguy

Expert
Licensed User
Longtime User
I got it working...

My main problem was how to retrieve the info...
then I found you litle text help on trhe door thread, wich made it clear...
Thanks Andrew...
 
Top