Cocos2d-x provides a mecanism for handling touch, keyboard, mouse and custom events for user input and game play mechanics.