title: processing delete key not reading
body: <p>so I am trying to have a delete function in my processing program:</p>
  <pre><code>void keyPressed(int event){
    for(int i = 0; i &lt; searchbars.length; i++){
      if(event == 127){
        searchbars[i].delete();
      }
      else{
        searchbars[i].write(key);
      }
    }
  }
  </code></pre>
  <p>the delete key in java is represented by the integer 127. I guess I don't fully understand the <code>event</code> option for <a href="http://processing.org/reference/keyPressed_.html" rel="nofollow noreferrer">processing's keyPressed()</a></p>
  <p>I tried doing the <a href="http://processing.org/reference/key.html" rel="nofollow noreferrer">key</a> method as follows:</p>
  <pre><code>void keyPressed(){
    for(int i = 0; i &lt; searchbars.length; i++){
      if(key == DELETE){
        searchbars[i].delete();
      }
      else{
        searchbars[i].write(key);
      }
    }
  }
  </code></pre>
  <p>but that doesn't seem to work either! <strong>What am I doing wrong?</strong></p>
  <h1>note:</h1>
  <p><code>searchbars</code> is a list of searchbars that are a class/element in the GUI that can have a character written into them with <code>write()</code>, and has the last character deleted when <code>delete()</code> is called</p>