Change Pickup key

Hey everybody :slight_smile:
I have a little problem that i cant solveā€¦ Im not really in to C# but i got a pickup script that picks up the object with mouseclick. How can i change it so you pick it up with the key E?.This might be a noobie question but im not in to C# can someone help me please:)

`using System.Collections;

public class Pickup : MonoBehaviour
public enum Item

public float Distance = 5.0f;
public Item item;
public AudioClip flashlightSound;
public AudioClip batterySound;
void OnMouseDown()
	var playerPos = GameObject.FindGameObjectWithTag("Player").transform.position;
	if(Vector3.Distance(playerPos, transform.position) <= Distance)
		       if(item == Item.Flashlight)
		Flashlight.HeadLightMount.SetActiveRecursively(true); = true;
        AudioSource.PlayClipAtPoint(flashlightSound, transform.position, 1);
        HUD.HasFlashlight = true;
       AudioSource.PlayClipAtPoint(batterySound, transform.position, 1);


I believe if you change void OnMouseDown() to void update() and change your code on line 11 to this

 if(input.GetKeyDown(KeyCode.E) && Vector3.Distance(playerPos, transform.position) <= Distance)

it should allow you to pick up the flashlight with E. Hope this helps you.