Commit Graph

26 Commits

Author SHA1 Message Date
MattHag 46fafa0e68 hidapi: Explicitly load hidapi/udev implementation
Linux uses udev, other platforms use the cross-platform hidapi
implementation. Remove implicit loading of hidapi in hidapi/__init__.py.
2024-10-11 07:42:38 -04:00
MattHag 70def31942 Refactor: Distinguish module from package
Adapt module names to easily distinguish them.

Related #2480
2024-09-15 09:18:51 -04:00
MattHag d0a3e474c7
hidapi: Unify imports in hidapi package (#2487)
Remove all 'import xyz as _xyz' and favor import of module name to
get more context in the code.

Related #2273
2024-05-16 15:58:22 -04:00
Matthias Hagmann 5b09ace1f5 ruff: Apply single line import format
# Usage
pre-commit run --all-files

Related #2295
2024-03-13 15:41:21 -04:00
Matthias Hagmann 7ef3059b69 clean up: Remove editor specific marks
Related #2273
2024-02-29 10:10:46 -05:00
Matthias Hagmann 7774569971 Apply ruff format
Run ruff auto formatting using:
ruff format .

Related #2295
2024-02-20 15:41:10 -05:00
markopy 29ff35d553
Partial support for macOS and Windows (#1971)
* 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>
2023-11-28 16:25:17 -05:00
Hugo Osvaldo Barrera 22bf4fafff Drop unnecessary __future__ imports
These are all active by default on all recent Python versions.
2021-10-30 16:49:41 -04:00
Hugo Osvaldo Barrera b96d16672b Drop obsolete encoding declaration
This was only parsed in Python 2.
Python 3 only supports UTF-8 for source files, and that's what it uses.
2021-10-30 16:49:41 -04:00
Alex Cherkayev 7a82b93aaf udev: add function to get wpid from udev
base: make workaround flag name more generic
descriptors: fix wpid's for 27Mhz devices
device: Improve wpid and kind processing for 27Mhz devices
notifications: Improve wpid generation for 27Mhz devices
docs: fix wpid's for EX100
2020-09-07 11:43:25 -04:00
effective-light fe55e39560 udev: use HID_PHYS instead of HID_UNIQ to look for relevant child nodes 2020-08-25 06:47:07 -04:00
Filipe Laíns 627185079f flake8: initial fix
Signed-off-by: Filipe Laíns <lains@archlinux.org>
2020-07-07 15:11:15 +01:00
Filipe Laíns e6369e0c3c isort: intial import fix
Signed-off-by: Filipe Laíns <lains@archlinux.org>
2020-07-07 15:11:15 +01:00
Filipe Laíns 72a8d311bc yapf: change code style to yapf
Signed-off-by: Filipe Laíns <lains@archlinux.org>
2020-07-07 15:11:15 +01:00
Daniel Pavel 38c76393b1 added copyright notices to all source files 2013-07-15 17:54:42 +02:00
Daniel Pavel ba55e4d9bd import * cleanups 2013-07-05 16:19:49 +02:00
Daniel Pavel f5d2eba0c4 hidapi: dropped native, slight update to the python implementation
added an optional filter for driver name when enumerating devices
2013-04-28 14:05:33 +02:00
Daniel Pavel 36f34da227 proper debian packaging, dropper stdeb 2013-01-05 11:48:35 +02:00
Daniel Pavel 064a7a113c added setup.py for python and debian packaging 2012-12-18 05:03:43 +02:00
Daniel Pavel b86dcce381 I come from the __future__, come with me if you want to live. 2012-12-07 17:10:22 +02:00
Daniel Pavel 50fedab19e re-worked how fd handles are used in multi-threading 2012-11-11 17:03:13 +02:00
Daniel Pavel d5f8a4bc45 cleanup in the pyudev hidapi implementation, incremented app version 2012-11-03 07:49:10 +02:00
Daniel Pavel 39855408ed added pyudev-based implementation of hidapi 2012-11-02 22:09:31 +02:00
Daniel Pavel c9f06aa5da clean-ups in LUR library 2012-10-11 18:38:57 +03:00
Daniel Pavel ecf3539ba2 cleanups 2012-10-05 13:26:52 +03:00
Daniel Pavel 7ba3a6fe70 made hidapi a package 2012-10-03 08:42:40 +03:00