how can I response click event on android system buttons? such as "menu", "back", etc..

for example, i registered click event like this:

@Override public boolean onCreateOptionsMenu(Menu menu) {
menu.add(0,0,0,“test1”);
menu.add(0,2,2,“test2”);
return super.onCreateOptionsMenu(menu);
}

as normally, it will pop up an optional menu group when clicked menu button, but in my cocos2d-x android project, after i copied the code to the major java class, then run the game and click the menu button on my htc g6, nothing happened…

is anyone who can tell my how to response such events? any suggestions will be appreciate… thanks

Cocos2dxGLSurfaceView catches key-down events and pass them to c++, may be you should change it.