How can I get a combination of keys pressed?

Hello... I'm trying to get a combination of keys pressed or buttons held down.

The right thing is that I want to make a Ctrl+Z function in my proyect, so if I press the key Control, hold down it and then press the Z key, I want that my last action to be eliminated.

I have something like this, but it doesn't work at all...

Event e = Event.current;
if (e.control)
{
   print("control!");
   if (Input.GetKeyDown("Z"))
   {
      print("Deshacer!");
   }

   if (Input.GetKeyDown("Y"))
   {
      print("Rehacer!");
   }
}

The Event class should only be used in OnGUI() and the Input class should not be used in OnGUI.

For combination like CTRL-Z you can use:

void OnGUI()
{
    Event e = Event.current;
    if (e.type == EventType.KeyDown && e.control && e.keyCode == KeyCode.Z)
    {
        // CTRL + Z
    }
}

or what should also work:

void Update()
{
    if ((Input.GetKey(KeyCode.RightControl) || Input.GetKey(KeyCode.LeftControl)) && Input.GetKeyDown(KeyCode.Z))
    {
        // CTRL + Z
    }
}

this might be useful for anyone running this question:

On Unity 2018.2.7f1 for Linux, please use this:

            Event e = Event.current;
            if (e.type == EventType.KeyUp && e.control && e.keyCode == KeyCode.S)
            {
                    Debug.Log("SAVE");
            }