I have a JSB project running with 3.17.2
It is JS based and running fine on macOS, iOS and Android.
I am adding a new feature allows player use their keyboard to control the game like old school PC game.
It works fine on macOS, but no response on iOS, and I haven’t tried on Android yet.
The blue tooth keyboard 100% works, and it even works in an edit box within the game.
It is just not firing without focus on the edit box in the background
The keyboard event was register with eventManager
cc.eventManager.addListener({
event: cc.EventListener.KEYBOARD,
onKeyPressed:function (key, event) {
I also search the forum, found this
and change jsb_boot.js, so the mobile platform has
if( sys.isMobile ) {
capabilities["accelerometer"] = true;
capabilities["touches"] = true;
//if (platform === sys.WINRT || platform === sys.WP8) {
capabilities["keyboard"] = true;
//}
}
Does anyone know what else needs to be done for this to work?