Implemented low level hooks to determine if a key is being pressed.