Setting a boolean to true with an if statement?

I’m trying to get a key to open a door by using a boolean. I’m setting it so that when the player comes into contact with the key it’ll automatically pick the key up and when coming into contact with the door it’ll load the next level. My code keeps throwing an error and I can’t figure out why. Here’s what I’ve written so far.

public class getkey : MonoBehaviour {
private bool keys = false;

// Use this for initialization
void Start () {


}


void OnCollisionEnter2D(Collision2D other)
{
	if (keys == false)
	{
		bool keys == true;
	
	}

	if (keys == true)
	{
		Application.LoadLevel (1);
	}
}

}

You should only use one = to set keys to true.

This is an assignment of a value to a variable (by using =):

bool isCool = true;

This is a boolean operator, to check if a variable has a certain value (by using ==):

if(isCool == true)
{
  Debug.Log("is cool");
}
else
{
  Debug.Log("is not cool");
}

And since you want to do an assignment if one condition is true, you should use the assignment call.