added a debug log when a key is pressed