How to Override Menu Button

You can override the default behavior of system key presses by intercepting them in your Activity. This is done by overriding the onKeyDown event, and returning true if you want to prevent the key from being handled by the system.
The code for your case should look something as follows:

@Override 
public boolean onKeyDown(int keyCode, KeyEvent event) { 
     if ( keyCode == KeyEvent.KEYCODE_MENU ) {

     //Put the code for an action here

     return true;  
  } 
return super.onKeyDown(keyCode, event); 
  }