'Switch' was not declared in this scope

Hello, I’m new to programming. Can anyone help me to fix this problem?

Here’s my code:

#include <Keypad.h>
#include <Password.h>
#include <Servo.h>
Servo myservo;

Password password = Password(“12345”); //password to unlock, can be changed

const byte ROWS = 4;
const byte COLS = 3;
char keys[ROWS][COLS] = {
{‘1’, ‘2’, ‘3’},
{‘4’, ‘5’, ‘6’},
{‘7’, ‘8’, ‘9’},
{’*’, ‘0’, ‘#’},

};

byte rowPins[ROWS] = {9, 8, 7, 6};
byte colPins[COLS] = {5, 4, 3};
Keypad keypad = Keypad(makeKeymap(keys), rowPins, colPins, ROWS, COLS);

void setup() {
Serial.begin(9600);
delay(200);
pinMode(11, OUTPUT);
pinMode(12, OUTPUT);
myservo.attach(2);

keypad.addEventListener(keypadEvent); //add an event listener for this keypad
}

void loop() {
keypad.getKey();
myservo.write(0);
}

void keypadEvent(KeypadEvent eKey) {
switch (keypad.getState()) {
case PRESSED:
Serial.print(“Enter:”);
Serial.println(eKey);
delay(10);

{

Switch (eKey)

case’#’: checkPassword(); delay(1); break;
case’*’: password.reset(); delay(1); break;
default: password.append(eKey); delay(1);
}
}
}

void checkPassword() {
if (password.evaluate()) { //if password is right

Serial.println(“Accepted”);
delay(10);
myservo.write(90);
digitalWrite(11, HIGH);
delay(500);
digitalWrite(11, LOW);

}
else {
Serial.println(“Denied”); / if passwords wrong
delay(10);
myservo.write(0);
digitalWrite(12, HIGH);
delay(500);
digitalWrite(12, LOW);

password.reset();
}
}

}
}

Switch (eKey)

should be

switch (eKey)