Quoth IOhannes m
zmoelnig, on 21/04/2012 14:23:
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
On 2012-04-18 20:27, Andrew Faraday wrote:
I've had this problem before with [hid], apparently it's a hardware
issue called 'debouncing', which is often ignored because it is often
irrelevant (pushed is pushed, for game controllers, rather than a
button-on/button-off signal used for most music systems).
You can deal with the problem in pure data by using a trigger, float and
delay of one millisecond. See the attached patch, click the message
boxes and watch your terminal for the result.
[change] seems to be the more appropriate solution here...
fgmasdr
IOhannes
Thanks for the suggestion. The problem I have with these two
solutions is that they only work when the double triggers
are in sequence. Sometime they arrive like this:
[hid] 0.7, written by Hans-Christoph Steiner <hans@eds.org>
compiled on Apr 15 2012 at 08:12:47
[hid] opened device 4 (/dev/input/event4): AT Translated
Set 2 keyboard
print: key key_j 1
print: key key_l 1
print: key key_j 1
print: key key_l 1
print: key key_j 0
print: key key_j 0
print: key key_l 0
print: key key_l 0
So I would need to store the value of each key
individually and check each one with [change].
Instead of this long-winded method, I've downloaded
[linuxevent] which is working nicely so I think I'll stick
with this even though it may be deprecated?
Surely this is a bug with [hid] though?