Comments (4)
You could try to replace
ESP32-BLE-Keyboard/BleKeyboard.cpp
Line 76 in 63e08b7
with
USAGE(1), 0xB8, // USAGE (Eject) ; bit 4: 16
And also replace
ESP32-BLE-Keyboard/BleKeyboard.h
Line 67 in 63e08b7
with
const MediaKeyReport KEY_MEDIA_EJECT = {16, 0};
Then you should be able to use:
bleKeyboard.write(KEY_MEDIA_EJECT);
If you think your project could help other people, consider creating a repository for it here on GitHub.
from esp32-ble-keyboard.
Awesome thanks! will do. I will test this out when i get home tonight. I'm planning on open sourcing it, even though it will be pretty simplistic. Right now I'm just doing proof of concepts and learning new platforms. Appreciate the help
from esp32-ble-keyboard.
KEY_MEDIA_EJECT
Hi i have two questions
You could try to replace
ESP32-BLE-Keyboard/BleKeyboard.cpp
Line 76 in 63e08b7
with
USAGE(1), 0xB8, // USAGE (Eject) ; bit 4: 16
And also replace
ESP32-BLE-Keyboard/BleKeyboard.h
Line 67 in 63e08b7
with
const MediaKeyReport KEY_MEDIA_EJECT = {16, 0};
Then you should be able to use:
bleKeyboard.write(KEY_MEDIA_EJECT);
If you think your project could help other people, consider creating a repository for it here on GitHub.
hi i am new to cpp,
can you kindly answer my two questions
- whats the role of bit in the following line ?
USAGE(1), 0xE2, // USAGE (Mute) ; bit 4: 16 (copied fromESP32-BLE-Keyboard/BleKeyboard.h
Line 67 in 07e4bda
- in reference to the value of HID_CONSUMER_EJECT = 0xB8 from
https://github.com/NicoHood/HID/blob/d4938ddcff7970bc1d32a040a08afeac4915e4a9/src/HID-APIs/ConsumerAPI.h#L154
do we still have to use KEY_MEDIA_EJECT for this library ?
from esp32-ble-keyboard.
I tested T-vK's suggested modification to support the eject key, and it works! The only caveat (and maybe this is obvious to others) is that you should unpair with the keyboard and then repair to make sure the device you are connecting to is using the new mapping.
from esp32-ble-keyboard.
Related Issues (20)
- Does not work properly on ESP32-C3 HOT 8
- works on windows 10 and android but not on windows 11
- HELP !!! Windows 10 (2024) Update Causes No HID Keyboard Drivers to be Loaded on connect HOT 3
- unable to disconnect from a connected device.
- ReleaseAll does not release MediaKeys
- Lots of errors trying to compile latest version in IDE 2.0 HOT 4
- Arduino Nano ESP32 Not Supported in 0.3.2
- Doesnt print to text editor-HELP URGENT HOT 5
- isConnected, but not paired
- Unable to press or execute any task HOT 1
- up to 10 Sec delays...
- Use unsupported media keys on USB
- Incompatibility with ESP32 2.x by Esspresif
- Adafruit QTPY ESP32-S3 - Constant reconnections and not sending keyboard messages. HOT 2
- BleKeyboard not communicate after reset HOT 3
- AZERTY issues
- XIAO ESP32-S3 BLE Reconnection Problems on Windows 11 HOT 1
- Getting Exit Status 1 every time I run a code with this library or even the example for that matter - PLZ HELP! HOT 6
- thx i love it
- ### Related area
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from esp32-ble-keyboard.