title: Android: How to add listener to hardware menu button?
body: <p>I'm currently trying to add a click listener to the menu hardware button. Currently I'm just putting my onclick logic into the onCreatePanelMenu-method and return false. But that just feels wrong.</p>
  
  <p>Is there a more clean way?</p>
  
  <p>The code currently looks like that:</p>
  
  <pre><code>@Override
  public boolean onCreatePanelMenu(int featureId, Menu menu) {
      Toast.makeText(this, "HALLO!", Toast.LENGTH_SHORT).show();
      return false;
  }
  </code></pre>