[Newbies] Detecting keyboard state / finding older fixes

Bert Freudenberg bert at freudenbergs.de
Fri Mar 7 17:23:27 UTC 2008


On Mar 7, 2008, at 17:53 , stan shepherd wrote:

>
> I am indeed on Linux. I have a feeling that Windows was the same  
> (coding in
> Java).

I am pretty sure it works in the Windows VM. You should get multiple  
keyDown events but a single keyUp:

Down ... (pause) ... down - down - down - down - down - up.

> That is, in the programming language a real key down and a repeat are
> indistinguishable.

The problem is that from the X11 VM you get this:

Down ... (pause) ... up down - up down - up down - up down - up.

Now, the up and down events bear the same time stamp (they are  
synthesized together) so the VM could actually filter out the  
unwanted up events, but it does not (yet anyway). Also, you do not  
get events for all keys like Shift etc. (IIRC only Windows gets that  
right).

It's a shame to admit this is still not working ...

- Bert -




More information about the Beginners mailing list