2012/5/8 Ariel Luciano Rodriguez <ariellurodrig...@gmail.com>

> Hello, I'm starting to do a kind of typing-tutor program for fun, Im just
> starting modelling a visual keyboard and I'm facing this problem:
> While holding down a key (not a meta character) first a keypress event is
> released, and if i keep holding the key a series of keypress and keyrelease
> events start to happen while I haven't actually released the key.
>
> So basically my question is, can you think of a way I can program the
> holding down of the key event?
>
> Thanks in advance.
>
> ------------------------------------------------------------------------------
> Live Security Virtual Conference
> Exclusive live event will cover all the ways today's security and
> threat landscape has changed and how IT managers can respond. Discussions
> will include endpoint security, mobile security and the latest in malware
> threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/
> _______________________________________________
> Gambas-user mailing list
> Gambas-user@lists.sourc82,21 eforge.net<Gambas-user@lists.sourceforge.net>
> https://lists.sourceforge.net/lists/listinfo/gambas-user
>


yes ... for me it's a bug ... the key release at least must not be
generated, during the key repetition.

so with a code like that: you will be able to catch the key.

Private $aKeys As New Integer[]

Public Sub Form_KeyPress()
  If $aKeys.Exist(Key.Code) Then Return
  Print "press" & Key.Text
  $aKeys.Add(Key.Code)

End

Public Sub Form_KeyRelease()

  If $aKeys.Exist(Key.Code) Then
    $aKeys.Remove($aKeys.Find(Key.Code))
    Print "Release" & Key.Text
  Endif


End


Benoit ?




-- 
Fabien Bodard
------------------------------------------------------------------------------
Live Security Virtual Conference
Exclusive live event will cover all the ways today's security and 
threat landscape has changed and how IT managers can respond. Discussions 
will include endpoint security, mobile security and the latest in malware 
threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/
_______________________________________________
Gambas-user mailing list
Gambas-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/gambas-user

Reply via email to