0

I'm trying to use an Arduino Pro Micro as a cheap Rubber Ducky. I want to use it on a PC that uses the Belgian AZERTY layout.

The problem is that Keyboard.h is not designed for AZERTY keyboards. When I use it on a PC set to QWERTY, it works fine. However, on AZERTY, some keys get mapped incorrectly. For example, typing "notepad" ends up as "notepqd". I could work around this by manually adjusting my code, but it becomes much more cumbersome when I need characters like : or /.

I’ve tried 4–5 other libraries that supposedly support AZERTY, but none were compatible with my board or my version of the Arduino IDE (2.3.6).

Does anyone know a reliable way to make Keyboard.h (or an alternative) work correctly with AZERTY layouts on a Pro Micro?

asked Sep 20 at 17:47
4
  • You can create your own keyboard_layout.h by modifying the library. Commented Sep 20 at 23:37
  • Did you try initializing the library with Keyboard.begin(KeyboardLayout_fr_FR);? Is that French AZERTY layout close enough for your needs? If not, would you be willing to submit a pull request to the Keyboard library with the Belgian layout? Commented Sep 21 at 10:33
  • Thank you very much, @EdgarBonet. The Keyboard.begin(KeyboardLayout_fr_FR); function works perfectly. Commented Sep 21 at 15:19
  • That's cool if it works for you! I added this info as a proper answer. Commented Sep 21 at 21:23

1 Answer 1

2

The Keyboard library does not support the Belgian keyboard layout. It does, however, support the French layout:

Keyboard.begin(KeyboardLayout_fr_FR);

This is an AZERTY layout close to, but not identical, to the Belgian layout. Depending on what you want to type, it could be usable for you.

If this doesn't fit the bill, you may create a Belgian layout yourself: copy KeyboardLayout_fr_FR as KeyboardLayout_fr_BE, and edit that file to match the actual Belgian layout. If you do so, it would be nice to contribute it to the Keyboard library as a pull request.

answered Sep 21 at 21:22

Your Answer

Draft saved
Draft discarded

Sign up or log in

Sign up using Google
Sign up using Email and Password

Post as a guest

Required, but never shown

Post as a guest

Required, but never shown

By clicking "Post Your Answer", you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.