Arduino Nano RP2040 Connect keyboard

1.Hello, I am working with the USBHID library with the keyboard, I already understand how it works, this would be the command to send the key

keyboard.key_code(UP_ARROW)        

but I can't get the following keys to work (Enter, Esc, space)

2.He also failed to get both libraries to work together. #include "PluggableUSBHID.h" #include "USBKeyboard.h" #include "USBMouse.h" USBMouse Mouse; USBKeyboard Keyboard;

Did you try '\n' (Newline) for Enter? The ASCII map doesn't provide a translation for '\r' (Return).

The ASCII map doesn't supply a translation for ESC.

You should be able to get a space with ' '.

You could fix the ESC problem by changing this line in USBKeyboard.cpp:
{0, 0}, /* ESC */
to
{0x29, 0}, /* ESC */

While you are there you can add the mapping for '\r' by changing:
{0, 0}, /* CR */
to
{0x28, 0}, /* CR */

thanks for the information the library is not very detailed

This topic was automatically closed 180 days after the last reply. New replies are no longer allowed.