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

EventListenerKeyboard not working on ios simulator #17576

Open
kibozh opened this issue Mar 23, 2017 · 2 comments
Open

EventListenerKeyboard not working on ios simulator #17576

kibozh opened this issue Mar 23, 2017 · 2 comments

Comments

@kibozh
Copy link

kibozh commented Mar 23, 2017

  • cocos2d-x version:3.14.1
  • devices test on:ios simulator iphone6s plus /ios 9.3 (mac osx 10.12.3 (16D32))
  • developing environments
    • Xcode version:Version 7.3.1 (7D1014)
      Steps to Reproduce:
  1. create a new lua project
  2. add the following code to function MainScene:onCreate()
local listener = cc.EventListenerKeyboard:create()
    listener:registerScriptHandler(function (keyCode, event )
        print("get key event")
    end, cc.Handler.EVENT_KEYBOARD_RELEASED)
    local eventDispatcher = self:getEventDispatcher()
    eventDispatcher:addEventListenerWithSceneGraphPriority(listener, self)

3.just build and run and then press any key, nothing print in xcode's console

@minggo
Copy link
Contributor

minggo commented Mar 27, 2017

Where to popup the keyboard?

@nickenchev
Copy link

There are hardware keyboards for iphones and ipads, the simulator emulates a hardware keyboard. I'm also not getting any keyboard events when running in iOS simulator.

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