title: android - getting soft keyboard key presses
body: <p>I am trying to get the key pressed on soft keyboard but am unable to do so.
  Currently i am using the following code</p>
  
  <pre><code>@Override
  public boolean dispatchKeyEvent(KeyEvent KEvent) 
  {
  int keyaction = KEvent.getAction();
  
  if(keyaction == KeyEvent.ACTION_DOWN)
  {
      int keycode = KEvent.getKeyCode();
      int keyunicode = KEvent.getUnicodeChar(KEvent.getMetaState() );
      char character = (char) keyunicode;
  
      System.out.println("DEBUG MESSAGE KEY=" + character + " KEYCODE=" +  keycode);
  }
  
  
  return super.dispatchKeyEvent(KEvent);
  </code></pre>
  
  <p>}</p>
  
  <p>It is catching key events for the hardware keyboard but not for the virtual one. Can someone help me out</p>