USB Keyboard.h, asking for clarification before starting

I am have started to learn a bit of French using Duolingo, but i run into the limitation of my keyboard for typing in special characters. Creating a separate USB keyboard to add accents etc seems like a good option, or even a BT keyboard using an ESP32 may be even better.

In case of a USB keyboard i could use a Micro and any combination of 2 button presses could send the character of my choice, but going through the documentation it states that the keyboard.h library actually takes over the local keyboard and disables it. This i don't want, is it enough to just execute a Keyboard.end() to release it again ?

Would it be easier to create a BT keyboard ? Since that could be side by side with the local keyboard (of my laptop) regardless.

This is incorrect. It works just the same as if you had multiple standard keyboards plugged into your computer. You can type on your normal keyboard while the Micro running the Keyboard library is connected to the computer.

Ok, that makes a lot more sense, so it is only really an issue in case i get the micro to send keystrokes without controlling them. Thanx that wasn't fully clear from the documentation.

For completions sake, this is what i've done as simple test to type some special French characters on my windows machine using an Arduino Micro

/* https://docs.arduino.cc/language-reference/en/functions/usb/Keyboard/keyboardModifiers/ */

#include "Keyboard.h"

#define BUTTON_1 3
#define BUTTON_2 4

#define KEY_KP_ENTER 0xE0

uint8_t previousButtonState = 0x3;  

// Just a small selection of extended ascii characters that can be sent using
// ALT + 3 or 4 digits. The 'œ' 'Œ' can be sent using 0156 & 0140, but a preceding 
// '0' in a numeric value is unpractical (and incorrect syntax) but changing that 
// into a '1' and then decoding it later and converting it to sending an extra 
// preceding '0' works out ok.

int chars[] = {128, 130, 131, 1156, 1140}; // Çé✌

uint8_t nr_chars = 5;
                

void setup() {

  pinMode(BUTTON_1, INPUT_PULLUP);
  pinMode(BUTTON_2, INPUT_PULLUP);

  Keyboard.begin();
}

void loop() {
  // read the pushbutton:
  uint8_t buttonState = digitalRead(BUTTON_1);
  buttonState += (digitalRead(BUTTON_2) << 1);

  if ((buttonState != previousButtonState) && (!buttonState)) {

    for (uint8_t i = 0; i < nr_chars; i++) {
      sendExtendedASCII(chars[i]);

    }
    Keyboard.press(KEY_RETURN);
    Keyboard.releaseAll();
    delay(50);
  }

  previousButtonState = buttonState;
}


void sendExtendedASCII(int asciiCode) {

  int thousands = asciiCode / 1000;
  int hundreds = (asciiCode / 100) % 10;
  int tens = (asciiCode / 10) % 10;
  int ones = asciiCode % 10;
  
  if (!hundreds) hundreds += 10;  // somehow a '0' is 10 more.
  if (!tens) tens += 10;
  if (!ones) ones += 10;

  // Hold Left Alt
  Keyboard.press(KEY_LEFT_ALT);

  // Press the specific Numpad keys
  // Note: Numpad keys are mapped to specific modifiers in Keyboard.h

  if (thousands) Keyboard.write(KEY_KP_ENTER + 10); // if it is more than a 1000, write a '0'
  
  Keyboard.write(KEY_KP_ENTER + hundreds); 
  Keyboard.write(KEY_KP_ENTER + tens); 
  Keyboard.write(KEY_KP_ENTER + ones); 

  // Release Left Alt
  Keyboard.releaseAll();
}

Very happy with the simple progress.

Thank you, you made my day.