chegewara / EspTinyUSB

ESP32S2 native USB library. Implemented few common classes, like MIDI, CDC, HID or DFU (update).
MIT License
489 stars 70 forks source link

Keyboard Multi Layout support #10

Open joelsernamoreno opened 3 years ago

joelsernamoreno commented 3 years ago

Hi!

I added multi layout support

Now you can use en_us, es_es, it_it layouts

I will try to add more layouts when I have free time

To use this: read the Keyboard multi layout support section in README.md

chegewara commented 3 years ago

Thanks for this PR, but i would suggest to change code the way the users wont need to change library to use it.

joelsernamoreno commented 3 years ago

I think this is a little difficult

If you have any idea how to do this, I can try this

chegewara commented 3 years ago

There is few ways. One is to include all keymap arrays and add function that will assign one when language/layout is selected with separate function. This way is not the best option, because will include all arrays and increase binary by 1-2kB, depending on layouts amount. But this is some start.

Another option may be to add extern KEYMAP[] in hidkeyboard.h and user will have to add #include layoutxxx.h in their code.

joelsernamoreno commented 3 years ago

Hi

I have seen that you have added SD Mass Storage

I tried to test this but when I compile the example your library gives many errors.

Now I can't use the keyboard example either

I attach screenshots with the errors:

Selección_049

Selección_050

Selección_051

Selección_052

Selección_053

chegewara commented 3 years ago

@joelsernamoreno Please open new issue so we can track it.