* Fix: handle `HIDError` in `hidapi.hidapi_impl._match()`
The `open_path()` function may raise `HIDError` but `_match()`, its caller, does not handle it, unlike other cases after opening the path. This affects to the device enumeration process in `hidapi.enumerate()`, causing some devices to be randomly undiscovered.
* hidapi: revert to independent checking of long and short HID++ features with an extensible refactor
* Refactor: too long line
Logger enabled checks clutter the code unnecessarily. The checks are
now handled in a custom logger class. Eventually they can be completely
removed in the future.
Related #2664
Use hidapi on macOS to communicate and configure Logitech peripherals
connected via Bluetooth. This brings macOS device support on the same
level as Linux. However, some rules might not be supported yet on macOS.
Tested with MX Keys and MX Master 3S.
Fixes#2729
Warnings found by automatic code inspection and partially tackled
- Drop distuitls inf favour of setuptools
- Replace deprecated pyudev.Device.from_device_number
- Remove unnecessary brackets
- Avoid access to private variables etc.
- Shadows built-in name
- Line length >120 characters
- Not a module level variable
- Simplify clause
and more
The hidapi hardware layer must not know or depend on any UI libraries.
Removes all GDK dependencies from the hidapi packages, which makes
testing of these modules easier and removes unwanted cross-dependencies.
Related #2480
* Remove import as _ in solaar startup
Related #2273
* Remove import as _ in listener
Related #2273
* Remove import as _ in cli init
Related #2273
* Remove import as _ in gtk
Related #2273
* Remove import as _ in show
Related #2273
* Remove import as _ in tray
Related #2273
* Remove import as _ in profiles
Related #2273
* Remove import as _ in config
Related #2273
* Remove import as _ in config panel
Related #2273
* Remove import as _ in window
Related #2273
* Remove import as _ in pair
Related #2273
* Remove import as _ in pair window
Related #2273
* Remove import as _ in cli package
Related #2273
* Remove import as _ in ui package
Related #2273
* Remove commented out code
Related #2273
* Use constant for Logitech ID
Replace NamedTuples with more flexible dataclass, which also support
type hints. Introduce enums to replace constant strings, which need to
be kept in sync. Also enhances interfaces by limiting it to the enum
values. Remove unused variables.
* Fix CI for macOS
* Fix error message for missing hidapi
* Skip some device and receiver tests on macOS
Tests fail on macOS, enable them when unit tests are
refined to only test the module without dependencies.
* Safe guard dbus import
* Add support for macOS via hidapi
* Style fixes
* Ignore keyboard and mouse input devices
* Don't require pyudev on mac and windows
* Fix debug log format error
* More logging for failed hidpp checks
* Don't try to load hid_darwin_set_open_exclusive on windows
* Bring back button for rule editor since some rules will work
---------
Co-authored-by: markopy <(none)>
Co-authored-by: Peter F. Patel-Schneider <pfpschneider@gmail.com>