Closed
Description
Board
ESP32-S3
Device Description
ESP32-S3
Hardware Configuration
USB connection on ESP32-S3
Version
latest master (checkout manually)
IDE Name
PlatformIO / not relavant
Operating System
Win
Flash frequency
80Mhz
PSRAM enabled
no
Upload speed
USB
Description
The modifiers are not working for the USBHIDKeyboard::pressRaw(uint8_t k)/ USBHIDKeyboard::releaseRaw(uint8_t k)
The modifiers are between 0xe0 and 0xe8 this will represent the Bit in the _keyReport.modifiers.
Then you will need to subtract 0xe0 and not 0x80
Original code:
if (k >= 0xE0 && k < 0xE8) {
// it's a modifier key
_keyReport.modifiers |= (1<<(k-0x80));
Needs to be
if (k >= 0xE0 && k < 0xE8) {
// it's a modifier key
_keyReport.modifiers |= (1<<(k-0xE0));
Sketch
not provided.
Debug Message
There is not debug information
Other Steps to Reproduce
No response
I have checked existing issues, online documentation and the Troubleshooting Guide
- I confirm I have checked existing issues, online documentation and Troubleshooting guide.
Activity
EmileSpecialProducts commentedon Mar 15, 2024
I issue is in this file:
https://github.com/espressif/arduino-esp32/blob/master/libraries/USB/src/USBHIDKeyboard.cpp
P-R-O-C-H-Y commentedon Mar 15, 2024
Thanks @EmileSpecialProducts for reporting. I will take a look.
SuGlider commentedon Apr 9, 2024
This is correct. The modifiers are marked in a bitmap in the HID Report Descriptor.
SuGlider commentedon Apr 9, 2024
It shall be fixed with #9473