I have previosly used this library https://github.com/T-vK/ESP32-BLE-Keyboard to send keystrokes to an android through ble. Now i wanted to start using usb connection instead and got an S3 for the purpose which works otherwise but i cannot send one specific command which i was able to on ble.
So i need to open the search bar in the androids settings and in the ble library it was as simple as calling KEY_MEDIA_WWW_SEARCH, but no matter what i do i cant get it to work on usb. To my understanding the ble library sends the search key as 2 bites which are 0x21, 0x02 and these should correspond to 0x0221 (CONSUMER_CONTROL_SEARCH in the USBHIDConsumerControls). How ever this does not work.
I know this is badly explained but im hoping someone would know more of this than i do.
USB HID keyboard 'search' function
-
- Posts: 19
- Joined: Thu Oct 07, 2021 8:11 am
Re: USB HID keyboard 'search' function
Hi,
The USB HID protocol offers 2 interfaces
1. BOOT protocol: simple and easy protocols for keyboards. Does not support media keyds
2. HID custom protocol: You must define the additional (media) HID reports yourself, but you can send all kind of reports
Here is a nice thread, where users tried to implement media keys with ESP32 and Arduino https://forum.espruino.com/conversations/365217/ .
It can serve as a nice starting point
The USB HID protocol offers 2 interfaces
1. BOOT protocol: simple and easy protocols for keyboards. Does not support media keyds
2. HID custom protocol: You must define the additional (media) HID reports yourself, but you can send all kind of reports
Here is a nice thread, where users tried to implement media keys with ESP32 and Arduino https://forum.espruino.com/conversations/365217/ .
It can serve as a nice starting point
-
- Posts: 2
- Joined: Mon Apr 08, 2024 8:19 am
Re: USB HID keyboard 'search' function
Thank you for the response, i will read it thoroughly and try to implement the feture.
Who is online
Users browsing this forum: Baidu [Spider], Google [Bot] and 45 guests