title: Enter key on EditText hitting onKey twice
body: <p>I've attached an OnKeyListener to an EditText.  I've overrode the onKey handler to capture a KeyEvent.</p>
  
  <p>When a user hits the enter key (either their computer enter key while using the emulator, or the hardware enter key on their phone with a hardware keyboard), the onKey handler gets executed twice.  Both executions have the keyCode 66.</p>
  
  <p>Why is this happening?</p>
  
  <p>I want my screen so when the user hits the enter key, a search is performed.  Because of what is happening, the search is needlessly happening twice.</p>
  
  <p>My method looks like this:</p>
  
  <pre><code>   mFilter.setOnKeyListener(new View.OnKeyListener() {
  
          public boolean onKey(View v, int keyCode, KeyEvent event) {
              if (keyCode == KeyEvent.KEYCODE_ENTER) {
                  // perform search
                  return true;
              }
              return false;
          }
      });
  </code></pre>