title: Catching key pressed with the virtual keyboard in Android?
body: <p>With the physical keyboard you can catch key presses with a <a href="http://developer.android.com/reference/android/text/method/KeyListener.html" rel="noreferrer">KeyListener</a>, something like:</p>
  
  <pre><code>myEditText.setOnKeyListener(new OnKeyListener() {
      @Override
      public boolean onKey(View v, int keyCode, KeyEvent event) {
          if (keyCode == KeyEvent.KEYCODE_ENTER) { 
              /* do something */ 
          }
      }
  });
  </code></pre>
  
  <p>Does anyone know how to do this (or similar) with the virtual keyboard?</p>