The easiest way to use those devices is with the Blueprints that are available. They have all the required code to translate the events to actions.