Add key pressing detection.