Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Keyboard keys A and D not responding to code...I did click on Game Canvas as suggested #23

Open
Marcecor opened this issue Feb 2, 2019 · 3 comments

Comments

@Marcecor
Copy link

Marcecor commented Feb 2, 2019

Hi Everyone,
The following code is not working
// Initialize the keyboard input listening
cc.systemEvent.on(cc.SystemEvent.EventType.KEY_DOWN, this.onKeyDown, this); ..
when I run it on Simulator I get an error on that ...


Simulator: E/jswrapper (268): ERROR: Uncaught TypeError: Cannot read property 'a' of undefined, location: assets/scripts/Player.js:0:0
Simulator: jsb: ERROR: File ..\manual\jsb_cocos2dx_manual.cpp: Line: 653, Function: invokeJSKeyboardCallback
Simulator: invokeJSKeyboardCallback call function failed!


I have no clue on how to fix this ...any advice will be greatly appreciated.
thank you!

@Marcecor
Copy link
Author

Marcecor commented Feb 2, 2019

Just to clarify...the above is part of the very 1st Beginner Game tutorial. I like to run it in the Browser and my keyboard is not detected...thank you

@Mikiawm
Copy link

Mikiawm commented Mar 15, 2019

Same situation

@zxbobo123
Copy link

也是一样的问题,点击A D没有反应

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants