安卓返回键不响应

auto listener = EventListenerKeyboard::create();
listener->onKeyReleased =&](EventKeyboard::KeyCode keyCode, Event* event)
{
CCLOG(“listener\n”);
if(keyCode == EventKeyboard::KeyCode::KEY_BACKSPACE)
{
Director::getInstance()->end();
#if (CC_TARGET_PLATFORM == CC_PLATFORM_IOS)
exit(0);
#endif
}
};
this->getEventDispatcher()->addEventListenerWithSceneGraphPriority(listener, this);
怎么解决啊?我用的是3.1.1

用 EventKeyboard::KeyCode::KEY_ESCAPE 吧~

参考:http://bbs.csdn.net/topics/390823250