Somebody told me to do this but I do not know if it will work:
if (selectorHX != selectorPOS){
delay (100);}
if (selectorPOS == LOW){ // If switch is in the 'one' position
Keyboard.press(KEY_LEFT_ARROW);
delay (100);
Keyboard.releaseAll();
selectorHX = selectorPOS;}
else{
Keyboard.press(KEY_RIGHT_ARROW); // If switch is in the 'two' position
delay (100);
Keyboard.releaseAll();
selectorHX = selectorPOS;}