title: How to detect backspace in a keyTypedEvent
body: <p>I'm using Netbeans' bean form to create my GUI.<br>I've added a keyTyped event to a JTextArea and I want to detect if the typed key is a <kbd>Backspace</kbd>.</p>
  
  <p>I'm using keyTyped event for other reasons so I cannot just use the keyPressed event.</p>
  
  <p>This is the generated code (and my if check):</p>
  
  <pre><code>private void langArea1KeyTyped(java.awt.event.KeyEvent evt) {   
  
      if(evt.getChar()== backspace) //how can I make this check?   
  }     
  </code></pre>
  
  <p><code>evt.getKeyCode()</code> always returns 0 independent of the typed key.<br>
  <code>evt.getKeyChar()</code> simply deletes the last character printed when printed so I can't use <code>System.out.print(evt.getKeyChar())</code> to detect its value and check for it.</p>
  
  <p>How can I detect if the typed key is <kbd>Backspace</kbd> (or <kbd>Delete</kbd>)?</p>