HI,
I am using this code to listen to keyboard on my main.js
onLoad: function () {
cc.systemEvent.on(cc.SystemEvent.EventType.KEY_DOWN, this.onKeyDown, this);
},
onKeyDown: function (event) {
console.log(event);
},
Until I click in my canvas from mouse this listener doesnot listen to keyboard events.
I guess others javascript listener are disable by cocos by default. I tried using them to simulate a click or to change focous but they didnot worked.