title: Android - How to convert KeyEvent KeyCode to Char?
body: <p>I want to get the char value of the KeyCode Event when pressing an Android keyboard.</p>
  
  <pre><code>public void KeyCodeEventAsChar(int keyCode, KeyEvent event) {
  
    char pressedKey;
  
    // TODO: convert key Code Event into char
  
    syslog.d ("TEST", "The pressed key in Android keyboard was char: " + pressedKey);
  
  }
  </code></pre>
  
  <p>Does anyone has a clue how to do this?!</p>
  
  <p><strong>UPDATE:</strong></p>
  
  <p>I don't want hardcoded text! I want to convert it to correspondent char!</p>
  
  <p><strong>UPDATE 2:</strong></p>
  
  <p>I need also to dead chars such as: à, á, ò, ó, etc...</p>
  
  <p><strong>ANSWER FOUND:</strong></p>
  
  <pre><code>// TODO: convert key Code Event into char
  char pressedKey = (char) event.getUnicodeChar();
  </code></pre>
  
  <p><strong>IMPORTANT NOTE:</strong> char has only 1 byte length, so it will <strong>not</strong> support several chars</p>