combining source code limit switch with servo continuous

orry I wanted to ask, I was making a prototype for an automatic clothesline that uses a continuous servo to control the spin of the wheel, which I am confusing is controlling its son by using a limit switch, here I use 2 limit switches connected on PIN 7 and this is the source code for his clothesline…

#include <Servo.h>

Servo myservo;
int pos;
int ldr=0;
int senhu;

void setup ()

{
myservo.attach(9);
Serial.begin(9600);
pinMode(2, OUTPUT);

}
void loop(){
ldr = analogRead(A0);
senhu = analogRead(A1);
Serial.println(ldr);

if(ldr>=500 && ldr<600){
myservo.writeMicroseconds(2000);
}
else if(ldr>=600 && ldr<700){
myservo.writeMicroseconds(1000);
}
else{
myservo.writeMicroseconds(1500);
}

delay(100);
}

so is there anyone can help me to add source limit switch on souce code above ??
thank you

You obviously need to read the state of pin 7. Do you know how to do that ?

You have used pin 7 as the input for limit switches for both directions which makes things more complicated, but it can be done. Could you use different pins for each limit switch ?

When you do discover that a given limit switch is pressed, do you know what to do then?