-
Notifications
You must be signed in to change notification settings - Fork 7.6k
some keys doesn't work (ESP32-S3 USB-HID) #9743
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Comments
I have mistake |
This is a schematic |
it's not clear exactly which type of S3 you are using. If it has on-board OPI PSRAM, then GPIOs 35-37 are not to be used. Please enable debug to level Verbose and post the output of UART |
Thank you for your reply. this is an output with Verbose level debug
|
there were some prints before and after setup, showing your chip, config, etc. We need those :) |
So, what should I do ? |
if the sketch executes https://github.com/hathach/tinyusb/blob/master/src/class/hid/hid.h#L578-L586
|
What Arduino Core version is this project using? |
I'm using 3.0.0 (not RC). |
@SuGlider
I added this code at the end of while(true) {
usbkbd.pressRaw(HID_KEY_SHIFT_LEFT);
delay(1000);
usbkbd.releaseRaw(HID_KEY_SHIFT_LEFT);
delay(1000);
} In the keyboard test, the left shift key is being pressed and released. Should I replace |
Yes, it is possible, but the parameters are different for HID Key Codes can be seen here: The sketch you have presented uses ASCII as key code. More information in USB ORG documentation (HID Codes in Chapter 10) |
Thank you so much. I understood. #define Key_L_Shift 0xE1
#define Key_R_Shift 0xE5
#define Key_L_Ctrl 0xE0
#define Key_L_Win 0xE3
#define Key_L_Alt 0xE2
#define Key_R_Alt 0xE6
#define Key_R_Win 0xE7
#define Key_R_Ctrl 0xE4 void keyOut(const uint8_t key, const bool mode) {
if(key == 0) {
}else {
if(mode) {
if(digitalRead(MODE_SELECT) == HIGH) {
if((0xE0 <= key) && (key <= 0xE7)) {
usbkbd.pressRaw(key);
}else {
usbkbd.press(key);
}
}else {
blekbd.press(key);
}
}else {
if(digitalRead(MODE_SELECT) == HIGH) {
if((0xE0 <= key) && (key <= 0xE7)) {
usbkbd.releaseRaw(key);
}else {
usbkbd.release(key);
}
}else {
blekbd.release(key);
}
}
}
} Then my keyboard works well !! |
Marking as solved and closing :) |
Thank you so much everyone ! |
Board
ESP32-Dev-Module
Device Description
My original Keyboard prototype with ESP32-S3-WROOM-1
Hardware Configuration
In my Keyboard, GPIO 10, 11, 12, 9, 46, 3 are used as Scan lines and GPIO 42, 41, 40, 39, 38, 37, 36, 35, 45, 48, 47, 21, 14, 13, 8, 2, 1 are used as Read lines. Read lines are internally pulluped.
Version
latest master (checkout manually)
IDE Name
Arduino IDE 2.3.2
Operating System
Windows 11
Flash frequency
80 MHz
PSRAM enabled
yesno
Upload speed
921600
Description
Both Ctrl, Alt, Shift, Win keys on my keyboard do not work independently.
Like this : When I pressing the Ctrl key, did not show any response on the keyboard test
Keyboard test site : https://www.onlinemictest.com/ja/keyboard-test/
But, when I use this keyboard with BLE connection, they worked.
I would expect all keys to respond when pressed independently of each other.
Sketch
https://gist.github.com/53175ddd/0d95b3d494cd21595637ed0d233a8b87
Debug Message
Other Steps to Reproduce
No response
I have checked existing issues, online documentation and the Troubleshooting Guide
The text was updated successfully, but these errors were encountered: