Detecting user input via event polling