How can make the player move constantly when the key A or D is held down?

I can only move the player a little bit per keypress. Is there a way i can make it so that I constantly move, for as long as A or D is held down?

using System.Collections;
using System.Collections.Generic;
using UnityEngine;
using UnityEngine.Sprites;

public class PlayerController : MonoBehaviour 
{
	public float speed;

	private Rigidbody2D rb;

	void Update () {

		if (Input.GetKeyDown (KeyCode.A)) 
	{
		transform.Translate (-Vector3.right * Time.deltaTime * speed);
	}

	if (Input.GetKeyDown (KeyCode.D))
	{
		transform.Translate (-Vector3.right * Time.deltaTime * speed);
	}
	}
}

Try using GetKey instead of GetKeyDown.

GetKeyDown returns true during the frame the user starts pressing down the key identified by name.

GetKey returns true while the user holds down the key identified by name. Think auto fire.

Here is the link to GetKey scripting API: Unity - Scripting API: Input.GetKey