make keypress detection work when screen locked