why some keys (using 'key' obj)
do not respect limits like >,< etc..
i've done a patch where I needed that
values beyond some limits should not
to be considerated.it works for every
key values but for CTRL,SPACE BAR and
some others
-
Problems with KEY obj
-
not sure about the space bar,
but ctrl ,alt, shift ...etc are modifiers, pretty sure they don't have a value unless you use them in combination with other keys. (ctrl a...etc) -
i also have problems with the key object...because i want an event to continue while i am pressign a certain key, and then to stop when the key is released....but the key and keyup objects seem to be buggy for long keypresses, at least on macintosh, anyway.
-
actually that's not a bug, it's a feature. at bios level, from where the keypresses are routed to the operating system, there are two parameters that define the delay before a key is being "retriggered", and the rate at which it is doing so. some bios's let you change these values, but you can have a solution from within pd which won't alter all the other programmes' behaviour: (yeah, ascii pd sucks)
[key] [keyup]
|\ |
| [clear( |
| \ /
| \ / <- both connections head for the left inlet of the pipe
| [pipe 60]
| | \ <- and both connections come from the left outlet
| [set 0( \
| / \
[change] \
| \
| \
key out keyup out <- both retrigger free
of course this will add a latency to keyup events and swallow keypresses coming faster than 16 Hz, but that's the way i would've done it without changing bios or hardcoding customized key objects. try increasing the pipe delay if there's still retriggers for you.
somehow i think there's an even simpler solution to this....
greetings
stn -
arg. this forum eats up multiple spaces!
i'll just put it in words again: connect a [keyup] to a [pipe 60], what comes out of the pipe will later become your new, retrigger-free keyup. now connect a [key] element to a [clear( message heading into the pipe. also, connecect this [key] to a [change] and connect the pipe outlet to a [set 0( message which heads into the same [change]. the outlet of the change is your retrigger-free key function.
hope you figure out with help of the "graphic"
stn -
ah thanks syntax....that would work too....
but i did it the hard way and changed my system prefs.