[Gambas-user] Query Retrive single value ?
Benoit Minisini
gambas at ...2...
Fri May 9 11:53:36 CEST 2003
Le Vendredi 9 Mai 2003 02:48, Andrew Morrison a écrit :
> All:
> Can anyone tell me if you can program keyboard keys into gambas. For
> instance on my chat program i want to be able to hit the return key
> instead of clicking the send button if anyone can help me this it would
> be much appreciated.
>
> Andrew
>
>
The KeyPress event is for that.
FUNCTION xxxx_KeyPress(Ascii AS String, Code AS Integer, State AS Integer) AS
Boolean
Ascii -> Bad term. It is in fact the UTF-8 text associated with the key.
It can contains many characters.
Code -> The key code. Compare its value this way:
IF Code = Key["Space"] THEN ... ' Test the space key
State -> Mouse.Control + Mouse.Shift + Mouse.Alt
RETURN TRUE -> To cancel the key event
END
--
Benoit Minisini
mailto:gambas at ...1...
More information about the User
mailing list