only log keyboard data when a keypress occured