detects key pressing.'