thank you for your help:)
@mod said:
it depends how you have key repeat set up in your system preferences, but usually if you hold down a key, then after 500ms to 1sec it will rapidly fire key down/up messages. That's so, for example, when i hold down the 'q' key, i can get:
qqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqq
even with a [change] object, you'll still get key down/up messages alternating.
of course, if you have key repeat turned off in your OS, or if you're never going to hold a key down for more than half a second, it won't matter for you...but give it a go with holding your key down for a couple of seconds, and see what i mean.
I am getting repeated 1's, not alternating 0's and 1's, and all that occurs before the [change] object. And yes, my aim was to build a switch whose output is 1 as long as I am holding the key pressed.
@Maelstorm said:
[lister] doesn't do anything that you can't do with the vanilla
objects. It says in the helpfile that it's deprecated, so there's no real reason to use it.
I tried , but it gets destroyed when you put a letter as a creation argument in my abstraction:
list $1
...couldn't create
list k: unknown function
[lister] works ok, but I will adopt mod's solution (because I tend to keep all my abstractions and patches external independent. Actually, I think that [sel $1-key] was THE answer to my problem. That way, you always make sure that [sel] object is "symbol oriented", so you never get an error message "expected that, but got this". This is why I think it is a brilliant solution, so thank you mod, once again .