Compilation error for Arduino / Genuino Uno board

Hello ,
please, I ask your help, I really don’t know what’s wrong with the code?
I receive this error : Compilation error for Arduino / Genuino Uno board

#include <Keyboard.h>

const int led = 2;
const int switcher = 4;
boolean ReadSwitcher();
boolean premiereFois = false;

void setup() { 
pinMode(led, OUTPUT);   
pinMode(switcher,INPUT);
}

void loop() {
  {
 ReadSwitcher(); 
 }
if (!premiereFois){
if (digitalRead(switcher) == 1) {
  digitalWrite(led, 0); 
  return 0;
  }
else {
  digitalWrite(led, 0);
  return 0;
  }
premiereFois = true;
}


{
 
if (digitalRead(switcher) == 1) {
  digitalWrite(led, 1); 
  return 1;
}
 else 
 {
   digitalWrite(led, 0);
   return 0;
 }
}
}

if (!premiereFois){ That code is not in a function.

Edit: Scratch that - you've got too many braces.

The compiler gave you an error message, but you didn't post it all.

You don't appear to have a function called "ReadSwitcher"

this is all the error message :

In file included from C:\Users\user-pc\Desktop\test4\test4.ino:1:0:

C:\Users\user-pc\Documents\Arduino\libraries\Keyboard\src/Keyboard.h:29:2: warning: #warning "Using legacy HID core (non pluggable)" [-Wcpp]

#warning "Using legacy HID core (non pluggable)"

^

C:\Users\user-pc\Desktop\test4\test4.ino: In function 'void loop()':

C:\Users\user-pc\Desktop\test4\test4.ino:17:63: warning: return-statement with a value, in function returning 'void' [-fpermissive]

if (digitalRead(switcher) == 1) {digitalWrite(led, 0); return 0;}

^

C:\Users\user-pc\Desktop\test4\test4.ino:18:35: warning: return-statement with a value, in function returning 'void' [-fpermissive]

else {digitalWrite(led, 0);return 0;}

^

C:\Users\user-pc\Desktop\test4\test4.ino:28:10: warning: return-statement with a value, in function returning 'void' [-fpermissive]

return 1;

^

C:\Users\user-pc\Desktop\test4\test4.ino:33:11: warning: return-statement with a value, in function returning 'void' [-fpermissive]

return 0;

^

C:\Users\user-pc\AppData\Local\Temp\ccM7eYte.ltrans0.ltrans.o: In function `loop':

C:\Users\user-pc\Desktop\test4/test4.ino:15: undefined reference to `ReadSwitcher()'

collect2.exe: error: ld returned 1 exit status

exit status 1
Erreur de compilation pour la carte Arduino/Genuino Uno

You can't use } the Keyboard library on any { Arduino, including the Uno, that does not have e 32U4 chip.

You have useless curly braces of each { type all over the place. }

You can't just stick them in wherever you } think they { look pretty.