关于监听安卓实体返回键的问题

  • Creator 版本:2.0.7
    我在每个场景中都添加一下代码:
    `onLoad () {
    cc.systemEvent.on(cc.SystemEvent.EventType.KEY_UP, this.onKeyUp, this);
    },

onDestroy () {
cc.systemEvent.off(cc.SystemEvent.EventType.KEY_UP, this.onKeyUp, this);
},
onKeyUp(event){
var self = this;
if (event.keyCode == cc.KEY.back) {
self.onBtnBack()
}//手机返回键
},

onBtnBack:function () {
cc.director.loadScene(’********’);
},`
结果在用例hello world里面好使,自己项目不行
安卓部分报错如下:
04-17 16:11:55.765 1793-1892/? E/jswrapper: ERROR: Uncaught TypeError: Cannot read property ‘back’ of undefined, location: src/project.js:0:0
哪位哥哥能看一下问题出来那

已解决

求告知解决方法

cc.KEY.back 改为 cc.macro.KEY.back

判断条件试试这句话,之前的注释掉:
switch(event.keyCode) {
case 6:
this.onBackSceneBtn()
break;
}