-
-
Notifications
You must be signed in to change notification settings - Fork 840
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
Support MAC address as the identifier for bluetooth devices #3487
Conversation
if (auto c = reinterpret_cast<libkrbn_connected_devices_class*>(p)) { | ||
const auto& devices = c->get_connected_devices().get_devices(); | ||
if (index < devices.size()) { | ||
return devices[index].get_identifiers().get_device_address().c_str(); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This needs to be changed because it returns a pointer to data on the stack.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Sorry, I misunderstood and this code is fine.
(I misunderstood it as device_properties::get_device_address)
Thanks! |
I've identified a problem with Magic Mouse and Magic Keyboard not getting the device address properly, so I'm trying to fix it. |
Magic Mouse and Magic Keyboard support will be available soon. |
@stackia |
Thanks @tekezo ! I just checked v14.12.2 works great for my BLE keyboards! |
If device-specific Simple Modifications had already been registered in previous versions, they were hidden in the Settings UI. |
@stackia |
Thanks, I tried 14.12.3 and it looks good so far! |
Thank you! |
This PR adds
device_address
(which is the MAC of Bluetooth devices) as a matchable device identifier.(pqrs-org/cpp-osx-iokit_hid_device#1 should be merged as a prerequisite)
device_address
is usually helpful for Bluetooth mouse/keyboards when the manufacturer doesn't send a valid vendor_id / product_id. For devices that have conflict vendor_id / product_id, we can also usedevice_address
to distinguish between them (location_id
can achieve the same thing, but MAC address should be more straightforward for users).For example, we can now use such conditions in manipulators to match a device with a given MAC address.
The setting UI has also been updated to reflect the change:
(The
H (Adafruit Industries)
above has vendor_id/product_id both set to0
, so onlydevice_address
is displayed.)This may fix these related issues: