Similar to other keyboard found in :
https://github.com/espressif/arduino-esp32/tree/master/libraries/USB/src/keyboardLayout
This file adds French Swiss (fr_CH) keyboard layout support for the Arduino ESP32 USB library, compatible with those keyboards that can be found in :
https://github.com/espressif/arduino-esp32/tree/master/libraries/USB/src/keyboardLayout
Examples : KeyboardLayout_da_DK.cpp, KeyboardLayout_en_US.cpp, etc.
Watch the tutorial on YouTube, in french
Read the full guide on my website, in french
Under Linux, place this file in:
~/.arduino15/packages/esp32/hardware/esp32/3.3.5/libraries/USB/src/keyboardLayout/
after having installed the library found in :
https://github.com/espressif/arduino-esp32/tree/master/libraries/USB/ I explain it in my documentation.
MIT — Free to use, modify, and integrate into other projects. You can use and modify my file : KeyboardLayout_fr_CH.cpp as you want. Optimal would be to include it in :
https://github.com/espressif/arduino-esp32/tree/master/libraries/USB/src/keyboardLayout
I added more than just the ASCII characters, to have access also to some UTF-8 characters with accents, like é à ç.
I gave also the example programme :
https://www.gisinb.ch/yt/arduino_nano_esp32/code/ex1372_ArduinoNanoEsp32_USB_Keyboard_simulation.ino
Use and modify it as you want.
Bernard Gisin — www.gisinb.ch