Quoth Hans-Christoph Steiner, on 22/04/2012 01:32:

On Apr 21, 2012, at 10:22 AM, James Dunn wrote:

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 <h...@eds.org> <mailto:h...@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?

Could be. If you think so, please file a bug report. I am happy to help anyone work thru this bug. I haven't used [hid] in a good long while tho, so I'm not up on the code or the issues, nor am I likely to have time to look at it.

.hc

----------------------------------------------------------------------------

I hate it when they say, "He gave his life for his country." Nobody gives their life for anything. We steal the lives of these kids. -Admiral Gene LeRocque

Ok I filed a bug report here:

https://sourceforge.net/tracker/?func=detail&aid=3522957&group_id=55736&atid=478070 <https://sourceforge.net/tracker/?func=detail&aid=3522957&group_id=55736&atid=478070>
_______________________________________________
Pd-list@iem.at mailing list
UNSUBSCRIBE and account-management -> 
http://lists.puredata.info/listinfo/pd-list

Reply via email to