The code for your case should look something as follows:
@Override
//Put the code for an action here
return true;
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);
}