title: In Pure Data how to keyup, keydown, and while keydown?
body: <p>I'm trying to setup a little midi keyboard (using my computer's keyboard) in Pure Data. It works this way:</p>
  
  <pre><code>press a key &gt; send a note_on on midi channel
  stop pressing a key &gt; send a note_off on midi channel
  </code></pre>
  
  <p>The problem is, that when you keep a key pressed the <code>[key]</code> object generates a series of inputs instead of a single (long) one. This stops the (desired) note from playing (since the original input stops, after ~500ms) and re-starts playing the note many times in a row.</p>
  
  <p>I've already tried <code>[change]</code>, <code>[timer]</code>+<code>[moses]</code> and other non-solutions, I'm looking for a better implementation of <code>[key]</code> that can handle long key-presses</p>
  
  <p>I'm looking for something that does <code>[key]</code>'s job but that can handle a long-press, if I long-press a key with <code>[key]</code> for more than a second it does something like:
  key....(1 sec passes)...keyup.key.keyup.key.keyup. and it goes on and on...</p>