Mouse Button controller going to bottom of screen

Okay so I am making a gaming controller out of an arduino esplora.
I needed a second joystick other than the onboard joystick, but could not obtain one, so I used a five position switch the code is fairly self explained.
When i plug the arduino in the mouse cursor just goes to the bottom right corner of the screen and the buttons on the switch do not work, How can I fix this?

#include <Esplora.h> 
#include <Mouse.h>
#include <Keyboard.h>
 const int upButton = 11;       // do I really need to take notes on this one for myself
 const int downButton = 9;     // Dude if I cant understand this it's hopeless
 const int leftButton = 10;   //
 const int rightButton = 1; //
 const int mouseButton = 28;
 int range = 5;
 int responseDelay = 10;
 

boolean buttonStates[8];

const byte buttons[8] = {

JOYSTICK_DOWN,

JOYSTICK_LEFT,

JOYSTICK_UP,

JOYSTICK_RIGHT,

SWITCH_RIGHT,

SWITCH_LEFT,

SWITCH_UP,

SWITCH_DOWN,

};

const char keystrokes[8] = {

'S',

'A',

'W',

'D',

'Q',

't',

'E',

'v'

};

//You can change the keys to whatever you want.
void setup()
{
  Mouse.begin();              // take control of the mouse
  Keyboard.begin();          // takes control of keyboard
  pinMode(upButton, INPUT);        // tells arduino that this constant is input
  pinMode(downButton, INPUT);     // tells arduino that this constant is input
  pinMode(leftButton, INPUT);    // tells arduino that this constant is input
  pinMode(rightButton, INPUT);  // tells arduino that this constant is input
  pinMode(mouseButton, INPUT); // tells arduino that this constant is input  

} 


void loop(){{
  int upState = digitalRead(upButton);
  int downState = digitalRead(downButton);
  int rightState = digitalRead(rightButton);
  int leftState = digitalRead(leftButton);
  int clickState = digitalRead(mouseButton);

  if(digitalRead(upState) == HIGH){
    Mouse.move(0, 100, 0);
    }
    if(digitalRead(downState) == HIGH){
    Mouse.move(0, -100, 0);
    }if(digitalRead(leftState) == HIGH){
    Mouse.move(-100, 0, 0);
    }
    if(digitalRead(rightState) == HIGH){
    Mouse.move(-100, 0, 0);
    }
    if(digitalRead(clickState) == HIGH){
    Mouse.click();
    }
    
  }
  
  
                      
    int valueSlider = Esplora.readSlider();
    if(digitalRead(valueSlider) > 800){
      Keyboard.press('r');
      }
  
//BELOW THIS LINE IS AKASH'S STUFF DO NOT TWEAK

for(byte thisButton = 0; thisButton < 8; thisButton++) {

boolean lastState = buttonStates[thisButton];

boolean newState = Esplora.readButton(buttons[thisButton]);

if (lastState != newState) {

if (newState == PRESSED) {

Keyboard.press(keystrokes[thisButton]);

}

else if (newState == RELEASED) {

Keyboard.release(keystrokes[thisButton]);

}

}

buttonStates[thisButton] = newState;

}

delay(50);

int yAxis = Esplora.readAccelerometer(Y_AXIS);

if (yAxis > -15)
{ Keyboard.press(KEY_LEFT_CTRL);
Keyboard.release(KEY_LEFT_CTRL);
delay(50);

}

  if (yAxis < 15) {
Keyboard.write((char) 32);
delay(50);
}

delay(50);
}
 const int upButton = 11;       // do I really need to take notes on this one for myself
 const int downButton = 9;     // Dude if I cant understand this it's hopeless
 const int leftButton = 10;   //
 const int rightButton = 1; //

I guess you ARE hopeless, then, since you left the stupid comments in.

so I used a five position switch

Connected to which 5 pins? With external resistors? Since you are not using the internal pullup resistors, you MUST have external resistors. Since you are expecting HIGH to mean pressed, they must be wired in a pull-down configuration.

These button pins are very interesting to put it mildly:

const int upButton = 11;    // leftmost Tinkerkit connector (labeled OUT2)
const int downButton = 9;   // blue on the RGB LED
const int leftButton = 10;  // green on the RGB LED
const int rightButton = 1;  // on the LCD connector (LCD reset)
const int mouseButton = 28; // a.k.a. A10 which also happens to be digital pin 10

An extra digitalRead():

    int upState = digitalRead(upButton);    //// value is 0 or 1
    ···
    if (digitalRead(upState) == HIGH) {     //// reads pin 0 or 1
      Mouse.move(0, 100, 0);
    }

I meant the other left:
(how the heck does this go to bottom right?)

    } if (digitalRead(leftState) == HIGH) {
      Mouse.move(-100, 0, 0);
    }
    if (digitalRead(rightState) == HIGH) {
      Mouse.move(-100, 0, 0);
    }
const int mouseButton = 28; // a.k.a. A10 which also happens to be digital pin 10

Pin 10 and pin 28 are quite separate pins. A10 is NOT the name assigned to digital pin 10. It is the name assigned to analog pin 10's use as a digital pin.

Pins 10 and 28 (A10) are the same pin on Leonardo/Micro/Esplora/other 32u4 boards.

Take a look at variants/leonardo/pins_arduino.h and pay attention especially to these:

#define PIN_A10  (28)

// D10#     A10     PB6     PWM16       OC1B/0c4B/ADC13/PCINT6


const uint8_t PROGMEM digital_pin_to_port_PGM[] = {
···
    PB, // D10 - PB6
···
    PB, // D28 / D10 - A10 - PB6
···
};

const uint8_t PROGMEM digital_pin_to_bit_mask_PGM[] = {
···
    _BV(6), // D10 - PB6
···
    _BV(6), // D28 / D10 - A10 - PB6
···
};


const uint8_t PROGMEM analog_pin_to_channel_PGM[] = {
···
    13, // A10      D10     PB6                 ADC13
···
};