I’d like to create a desktop version of my game using Cocos2d-x. I’ve already compiled it and ran on Linux. Cocos2d-x is great!
Is it possible to capture keyboard events (KeyUp, KeyDown) on desktop? I want to replace touch and accelerometer events for pressing Arrow Up, Down or Space Bar in a physical keyboard.
I’ve found some methods (like ccKeyUp and ccKeyDown) in documentation, but couldn’t understand how to use them.