Call Overridden Home button in the Search Interface
<p>I override the home button like this :</p>

<pre><code>@Override 
public boolean onKeyDown(int keyCode, KeyEvent event) {
    switch (keyCode) {
    case KeyEvent.KEYCODE_HOME: 
        System.out.println("hello");
        break;
    }
    return super.onKeyDown(keyCode, event);
}


@Override
public void onAttachedToWindow() {
    this.getWindow().setType(WindowManager.LayoutParams.TYPE_KEYGUARD);
    super.onAttachedToWindow();
}
</code></pre>

<p>I create also a search interface like : 
<a href="http://www.edumobile.org/android/android-programming-tutorials/search-interface/" rel="nofollow">http://www.edumobile.org/android/android-programming-tutorials/search-interface/</a></p>

<p>When I click on the search hardware button, the search interface comes up. But at the same time when I click on the home button, the overridden method for Home button is not called, and I go back to main screen of phone. Can you help me how can I fix it?  </p>
