can't handle keyboard events android
<p>I am trying to handle the back button event on my app but its not working at all. I have inplemented ActivityGroup in my app according to the post <a href="http://blog.henriklarsentoft.com/2010/07/android-tabactivity-nested-activities/" rel="nofollow">Android: TabActivity Nested Activities</a></p>

<p>I have added the following code according to many posts in this website</p>

<pre><code>@Override
public boolean onKeyDown(int keyCode, KeyEvent event) {
    Log.d(this.getClass().getName(), "back button pressed: " + keyCode);
    if (keyCode == KeyEvent.KEYCODE_BACK &amp;&amp; event.getRepeatCount() == 0) {
        Log.d(this.getClass().getName(), "back button pressed");
        return true;
    }
    return super.onKeyDown(keyCode, event);
}
</code></pre>

<p>but for some reason i still dont know i am not getting the lines to be logged, it goes back to the home screen. I know that the onBackPressed will not work for me because I need to have this app implemented using api level 4 and it is not available at this level.</p>

<p>My ActivityGroup has only two activities, one list view and a details view. I have put this code on all the three classes to try something different, but still cant get it working. I see "No keyboard for id 0" in the logs, but i dont think it means something that can be related to the problem.</p>

<p>I do appreciate any answer to this.
Many thanks
T</p>
