if statements returns HIGH

Why does all of my if statements return HIGH when nothing is a attached?

#include <Keyboard.h>


const int buttonGreen = 2;     
const int buttonRed = 3;   
const int buttonYellow = 4;   
const int buttonBlue = 5;   
const int buttonOrange = 6;   
const int volt = 7;  

// variables will change:
int buttonstateGreen = 0;  
int buttonstateRed = 0;
int buttonstateYellow = 0;
int buttonstateBlue = 0;
int buttonstateOrange = 0;

void setup() {
 Keyboard.begin();
  buttonstateGreen = digitalRead(buttonGreen);
  buttonstateRed = digitalRead(buttonRed);
  buttonstateYellow = digitalRead(buttonYellow);
  buttonstateBlue = digitalRead(buttonBlue);
  buttonstateOrange = digitalRead(buttonOrange);
  
 if(buttonstateGreen == HIGH){

  Keyboard.write('A'); 
 }
 if(buttonstateRed == HIGH){

  Keyboard.write('S'); 
 }
 if(buttonstateYellow == HIGH){

  Keyboard.write('D'); 
 }
 if(buttonstateBlue == HIGH){

  Keyboard.write('F'); 
 }
 if(buttonstateOrange == HIGH){

  Keyboard.write('G'); 
 }
}

How are your buttons wired to the Arduino? Between Vcc and pin or between pin and GND? Are you using pull-down or pull-up resistors?

Also, take a peek at the pinMode() function.

sterretje:
How are your buttons wired to the Arduino? Between Vcc and pin or between pin and GND? Are you using pull-down or pull-up resistors?

Right now I have nothing hooked up to the arduino for debugging purposes

Does the sketch compile?
Where is loop()

Nothing connected, do you know about floating pins?

.

fluff113:
Why does all of my if statements return HIGH when nothing is a attached?

Because they've got to return something. Why would you expect them to not be HIGH?

Hey fluff. I know it was subtle, but read reply #2 again, and sus out what it means.

Nothing connected to the pins and no pinMode()s equals floating pins, which means any state is possible and HIGH is quite likely.