expected Unqualified-Id before switch [closed]

  arduino, arduino-c++, arduino-ide, c++, custom-keyboard

Could someone please help me with this, ive scartered the internet but yet i do not know how to fix it

// Variables that will change:
int modePushCounter = 0;     // counter for the number of button presses
int buttonState = 0;         // current state of the button
int lastButtonState = 0;     // previous state of the button
int mouseMove;
String password;             // string for rando password generator, its a global variable because i might do something fancy with it?

const int ModeButton = A0;    // the pin that the Modebutton is attached to
const int pot = A1;           // pot for adjusting attract mode demoTime or mouseMouse pixel value
const int Mode1= A2;
const int Mode2= A3;          //Mode status LEDs

 switch (modePushCounter) { // switch between keyboard configurations:
    case 0:    //  Application Alpha or MODE 0 ========================================================================
      digitalWrite(Mode1,LOW);  //indicate what mode is loaded
       if (key) {
    switch (key) {

Source: Windows Questions C++