1. A method, comprising: in a data processing device: receiving, from an application running on the data processing device, an indication that one or more sensors are associated with a user input for the application; determining, based on sensing information collected from the one or more sensors, a characteristic of the user input; refraining from entering a sleep mode if the characteristic of the user input matches a specific characteristic condition specified by the application; and allowing entering the sleep mode if the characteristic of the user input does not match the specific characteristic condition for a specific timeout period specified by the application.