It is good if you can find some file descriptor that is responsible for your hardware events.<div>If no then launch it in separate thread<span></span></div>