How to connect a 4 pin tactile switch?

So I'm trying to make use a tactile button to switch the effect of an led. I used two different loops for the effect but I don't know how to put the switch in the code and how to connect it to the circuit.

here is the code

#define button 2
#define led1 3


boolean modeState;

void setup() {
  pinMode (led1, OUTPUT);
  pinMode (button, INPUT_PULLUP);


}

void blink(){
  digitalWrite (led1, HIGH);
  delay (200);
  digitalWrite (led1, LOW);
  delay (200);  
  }

 void fade(){

   for (int a = 0; a <= 255; a+=50){
    analogWrite (led1, a););
    delay (100);
    }

   for (int a = 255; a >= 0; a -= 50){
    analogWrite (led1, a);
    delay (100);
    }

}
      
void loop() {
  int buttonState = digitalRead(button);

    if (buttonState == LOW){
       modeState = !modeState;
  }
    if (modeState == false){
      blink();
      }
      else {
        digitalWrite (led1, LOW);
        }

}

Thank you

The similar switch that I have has two pairs of pins permanently connected and when you press the button it connects the two pairs together. You can identify the pairs with your multimeter.

You should connect one of the pairs (either pin will do) to the I/O pin on your Arduino and connect the other switch pair to Arduino GND.

Then set the pin with pinMode(pin, INPUT_PULLUP); That will have the effect that when the button is not pressed digitalRead(pin) will register HIGH and it will register LOW when the button is pressed.

...R