[PD] keyname win / linux

Mathieu Bouchard matju at sympatico.ca
Thu Aug 15 00:36:47 CEST 2002

On Wed, 14 Aug 2002, marius schebella wrote:

> new problems: another difference between win(dos) and lin(ux) is the behavior 
> of the keyboard. if i hit a key and hold it down, then windows gives up, up, 
> up.... down. but linux reports up, down, up down, up, down .... (don't 
> laugh!). in this case i like the windows way more. has anybody already an 
> idea how to deal with that? perfect would be a "1" if the key is hit (no 
> matter how long i hold it down) and a "0" if it is released.
> marius.

When a key is repeating, the "down" message you get should have exactly
the same timestamp as the "up" message that preceded it. What is annoying
is that knowing that the key was actually released takes a little
delay: you have to wait and see whether a "down" event comes immediately
after the "up" event.

There is also a way to change the auto-repeat on the key, but it affects
all windows (you can get around that though), and probably not available
from PD (argh).

Mathieu Bouchard                       http://artengine.ca/matju

More information about the Pd-list mailing list