You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
As I'm new to the whole ESP32/Arduino-Stuff and have no previous knowledge of C++, i spent way too much time figuring this out.
There is an old pull request for this feature, which however was never merged due to compatibility concerns with the Arduino Keyboard library found here. Since the structure of the current version has changed much since the pull request, it cannot be cherry picked. Now here's my (simple, but working) solution to the problem:
Add the following lines to the public section in BleKeyboard.h
in your Sketch. Not as elegant as using Callbacks, but the changes to the code are minimal and hence it should keep on working for some versions down the road.
I sure hope this will help somebody who walks down the same path as i did :)
The text was updated successfully, but these errors were encountered:
As I'm new to the whole ESP32/Arduino-Stuff and have no previous knowledge of C++, i spent way too much time figuring this out.
There is an old pull request for this feature, which however was never merged due to compatibility concerns with the Arduino Keyboard library found here. Since the structure of the current version has changed much since the pull request, it cannot be cherry picked. Now here's my (simple, but working) solution to the problem:
Add the following lines to the public section in
BleKeyboard.h
In
BleKeyboard.cpp
replacevoid BleKeyboard::onWrite(BLECharacteristic* me)
with this new version and add the typedef blockYou can now query the state of the special Keys by using the variables
in your Sketch. Not as elegant as using Callbacks, but the changes to the code are minimal and hence it should keep on working for some versions down the road.
I sure hope this will help somebody who walks down the same path as i did :)
The text was updated successfully, but these errors were encountered: