[Gambas-devel] Form_Keypress always triggers Key.Esc
Laurent Carlier
lordheavym at ...176...
Tue Feb 8 06:15:52 CET 2011
Le lundi 7 février 2011 21:17:17, Zach Smith a écrit :
> Any key press will trigger Key.Esc. If you press CTRL, both CTRL and
> ESC will trigger.
>
>
> Public Sub Form_KeyPress()
>
> If Key.Control Then
> Print Time & " Control key pressed."
> End If
>
> If Key.Esc Then
> Print Time & " Escape key pressed."
> End If
>
> End
>
>
> Gambas 3, r3549
>
Key.Esc is a constant so it's always true, but Key.Control is a method :-)
If key.code = Key.Esc Then
Print Time & " Escape key pressed."
End If
++
More information about the Devel
mailing list