Show canvas by pressing Escape

Hey, There i got a question how can i Show canvas by pressing Escape???

For exampel for an pausemenu and for a map wenn i press m it will show the map camera.

And sorry for my English XD

void Update (){
    if(Input.GetKey("Escape"){
        uiGameObject.SetActive(true);
    }
}