[PD] key and keyup question
Simon Wise
simonzwise at gmail.com
Sun Jul 12 16:30:15 CEST 2009
Lorenzo wrote:
> Hi all,
>
> I'm a little confused by the behaviour of the [key] and [keyup] objects.
> What I'd expect is that they 'bang' and output the number only and only
> when a key is pressed (key) or depressed (keyup), while it looks like
> while a key is kept pressed they go on banging. Also a [keyup] seems to
> bang even when a key is 'down'.
> This also poses somewhat a problem with keyboard 'poliphony' say I keep
> a key pressed while also pressing other[s].
>
> Is my expectation simply wrong? I noticed that the behaviour is
> different when pressing keys like SHIFT, CTRL etc.
that behaviour comes from the OS, those objects listen to the events
that are sent to pd from the X server, not to the raw USB events that
[hidio] uses. To fix your problem you have change the key repeat
preferences on whatever OS you are using. You may also find you have
issues with which window is in focus - to receive the events the
appropriate pd window must be in focus. Again [hidio] [hid] etc use the
keyboard more directly, and receive all events even if the keyboard in
question is not being used by X, in addition you may select individual
devices with [hidio] while it is the sum of all the attached keyboards,
plus any synthetic X events, that [key] and [keyup] use.
But yes, [hidio] works for me with Debian and OSX, but it does not work
with Windows, apparently the USB interface is a pain, and quite
difficult to work with.
Simon
More information about the Pd-list
mailing list