Anybody could share a Keypad or Keybaord sample code?

Since I find the CCKeyboardEventDelegate.cpp, there should be with Keypad or Keybaord surpport, right? But, when I look in to the function CCEGLView::WindowProc, I start to have doubt of that.

I need keyPress event in win32, Could anybody give me a sample code or some advice. Any reply is greatly appreciated.

Best Regards.

It is not keyboard, it is the key used in android machine, like the home, menu.

When I want get keyboard event, What should I do?
Could you give me some directions?
Thanks.

You should do many things:

  1. Capture the keyboard event.
  2. Dispatch the event to the layer, just like CCTouchDispatcher do.

Hi, guo, I think you can try this http://www.cocoachina.com/bbs/read.php?tid-43889-fpage-5.html

@Walzer:

Thank you.

So sad! The code in the thread can’t be downloaded. Maybe I must implement by myself :frowning:

A more question. Can cocos2d-x support iOS gestures? For example, the Swipe, Pinch Open/Pinch Close, Touch and Hold, Shake etc.

Nope, you had to implement the gestures in game logic source.