EspTinyUSB icon indicating copy to clipboard operation
EspTinyUSB copied to clipboard

HID_KEY_RETURN does not work

Open rahmanshaber opened this issue 2 years ago • 1 comments

using arduino-esp32-2-rc1 and lib-1.3.2

/**
 * Simple HID mouse and keyboard composite
 * author: chegewara
 */


#include "hidcomposite.h"
#if CFG_TUD_HID
HIDcomposite device;

void setup()
{
    Serial.begin(115200);
    device.begin();
}

void loop()
{
    delay(1000);
    device.doublePressLeft();
    delay(1000);
    device.pressRight();
    delay(1000);
    device.move(-150, -150);
    delay(1000);
    device.move(150, 150);
    delay(1000);
    device.pressLeft();
    delay(1000);
    device.scrollUp(1);
    delay(1000);
    device.scrollDown(1);
    delay(1000);
    device.sendKey(HID_KEY_A);
    delay(1000);
    device.sendKey(HID_KEY_RETURN);
    delay(1000);
    device.sendKey(HID_KEY_T);
    delay(1000);
    Serial.println(device.sendString(String("123456789\n"))?"OK":"FAIL");
    delay(1000);
    Serial.println(device.sendString(String("abcdefghijklmnopqrst Uvwxyz\n"))?"OK":"FAIL");    
}

#endif
```

rahmanshaber avatar Jul 31 '21 08:07 rahmanshaber

https://github.com/hathach/tinyusb/pull/1012

chegewara avatar Aug 10 '21 09:08 chegewara