How can I check if a key/button is not (!) being held down?

I have a simple check for GetButtonUp and I would like to add a check to make sure another button is not being held down at the same time. For example, when the “W” button is released & the “A” button is NOT being held down (GetButton), then do something. I’ve tried adding a “!” infront of Input.GetButton but that doesn’t seam to do anything:

if (Input.GetButtonUp("Walk") && !Input.GetButton("WalkLeft")) {
//do something

So how could I do this simple functionality?

What you have there is the correct way of checking if the button is not being held down. Have you made sure the “WalkLeft” input is set up properly in the Input settings? Try testing with just “WalkLeft” and nothing else to make sure it works.