Check if a certain button was pressed

How can I check if I pressed button number 1 ?
I have like 5 button and I want to check if I pressed button number 1 do this if button number 2 to that.

The earlier only works with bound keys like attack/jump.

I didn’t used the button word correctly. I ment “DButton”

function DButton:DoClick() end? You really need to learn to use google/gmod wiki.

That doesn’t help me because it’s not what I am looking for.
For example: I have 4 Button + a Main Button. When you click on of the four button the Main button will be activated (It won’t be disabled anymore) and it will check if the first button was pressed do this.