test for keyboard press