<html><head></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; "><br><div><div>On Apr 21, 2012, at 10:22 AM, James Dunn wrote:</div><br class="Apple-interchange-newline"><blockquote type="cite">
  
    <meta content="text/html; charset=ISO-8859-1" http-equiv="Content-Type">
  
  <div bgcolor="#FFFFFF" text="#000000">
    Quoth IOhannes m zmoelnig, on 21/04/2012 14:23:
    <blockquote cite="mid:4F92B4C9.1060103@iem.at" type="cite">
      <pre wrap="">-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

On 2012-04-18 20:27, Andrew Faraday wrote:
</pre>
      <blockquote type="cite">
        <pre wrap="">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.
</pre>
      </blockquote>
      <pre wrap="">[change] seems to be the more appropriate solution here...

fgmasdr
IOhannes
</pre>
    </blockquote>
    <br>
    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:<br>
    <br>
    <tt>[hid] 0.7, written by Hans-Christoph Steiner <a moz-do-not-send="true" class="ecxmoz-txt-link-rfc2396E" href="mailto:hans@eds.org">&lt;hans@eds.org&gt;</a><br>
      &nbsp;&nbsp;&nbsp; compiled on Apr 15 2012 at 08:12:47 <br>
      [hid] opened device 4 (/dev/input/event4): AT Translated Set 2
      keyboard<br>
    </tt><tt>print: key key_j 1<br>
      print: key key_l 1<br>
      print: key key_j 1<br>
      print: key key_l 1<br>
      print: key key_j 0<br>
      print: key key_j 0<br>
      print: key key_l 0<br>
      print: key key_l 0<br>
      <br>
    </tt>So I would need to store the value of each key individually and
    check each one with [change].<br>
    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?<br>
    <br>
    Surely this is a bug with [hid] though?<br></div></blockquote></div><div><br></div>Could be. &nbsp;If you think so, please file a bug report. &nbsp;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.&nbsp;<div><br></div><div>.hc<br><div>
<span class="Apple-style-span" style="border-collapse: separate; color: rgb(0, 0, 0); font-family: Helvetica; font-size: 12px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: 2; text-align: auto; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px; -webkit-border-horizontal-spacing: 0px; -webkit-border-vertical-spacing: 0px; -webkit-text-decorations-in-effect: none; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0; "><span class="Apple-style-span" style="border-collapse: separate; color: rgb(0, 0, 0); font-family: Helvetica; font-size: 12px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: 2; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px; -webkit-border-horizontal-spacing: 0px; -webkit-border-vertical-spacing: 0px; -webkit-text-decorations-in-effect: none; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px; "><div><br class="Apple-interchange-newline">----------------------------------------------------------------------------<br></div><div><br></div>I hate it when they say, "He gave his life for his country." &nbsp;Nobody&nbsp;gives their life for anything. &nbsp;We steal the lives of these kids. &nbsp;-Admiral Gene LeRocque<br></span></span>
</div>
<br></div></body></html>