help 'button1' was not declared in this scope

im trying to make a button box and im getting error ‘button1’ was not declared in this scope
heres the code

#include <Keyboard.h>

void setup() {
const int button1 = 2;
const int button2 = 3;
const int button3 = 4;
const int button4 = 5;
int buttonState1 = 0;
int buttonState2 = 0;
int buttonState3 = 0;
int buttonState4 = 0;

pinMode(button1, INPUT);
pinMode(button2, INPUT);
pinMode(button3, INPUT);
pinMode(button4, INPUT);
}

void loop() {
   if ( digitalRead(button1) == HIGH) {
      Keyboard.press('S');
      Keyboard.press('y');
      Keyboard.press('s');
      Keyboard.press('t');
      Keyboard.press('e');
      Keyboard.press('m');
      Keyboard.press('.');
      Keyboard.press('o');
      Keyboard.press('u');
      Keyboard.press('t');
      Keyboard.press('.');
      Keyboard.press('p');
      Keyboard.press('r');
      Keyboard.press('i');
      Keyboard.press('n');
      Keyboard.press('t');
      Keyboard.press('l');
      Keyboard.press('n');
      Keyboard.press('(');
      delay(100);
      Keyboard.releaseAll();
   }
     if (digitalRead(button2) == HIGH) {
      Keyboard.press('i');
      Keyboard.press('n');
      Keyboard.press('t');
      Keyboard.press(' ');
      Keyboard.press('=');
      Keyboard.press(' ');
      delay(100);
      Keyboard.releaseAll();
    }
    if (digitalRead(button3) == HIGH) {
      
    }   
    if (digitalRead(button4) == HIGH) {

}
}

put global variable definitions outside setup() function

what does that mean?

Variables declared inside of a function are in scope only inside of a function. Once the function exits the variables no longer exist. Setup() is a function. Variables declared outside a function are global in scope and are visible throughout the sketch.