title: If KEY_TYPED event occurs when a character is generated, then why does code parameter to KeyEvent contains VK_UNDEFINED?
body: <p>I am taking help from Java:The complete reference(8th Ed) by Herbert Schildt to learn about Java.
  While reading, I found that KEY_TYPED event occurs only when a character is generated. Doesn't that mean that a character (0-9,A-Z) is generated? If so, then shouldn't the corresponding ASCII equivalents be passed as <em>code</em> to the KeyEvent constructor:</p>
  
  <pre><code>KeyEvent(Component src, int type, long when, int modifiers, int code, char ch)
  </code></pre>
  
  <p>But the book says, for KEY_TYPED events, code will contain VK_UNDEFINED. Isn't code here defined with the key typed?</p>