diff --git a/README b/README index e9c85343..38893b34 100644 --- a/README +++ b/README @@ -10,18 +10,19 @@ Currently the K750 solar keyboard is also queried for its solar charge status. Support for other devices could be added in the future, but the K750 keyboard is the only device I have and can test on. -Pairing and un-pairing of devices is planned, but not implemented at this time. - Requirements ------------ -- Python (2.7 or 3.2). +- Python (2.7 or 3.2). Either version should work well. - Gtk 3; Gtk 2 should partially work with some problems. - Python GI (GObject Introspection), for Gtk bindings. - pyudev for enumerating udev devices. - Optional libnotify GI bindings, for desktop notifications. +The necessary packages for Debian/Ubuntu are `python-pyudev`/`python3-pyudev`, +`python-gi`/`python3-gi`, `gir1.2-gtk-3.0`, and optionally `gir1.2-notify-0.7`. + Installation ------------ @@ -33,13 +34,17 @@ In rules.d/ you'll find a udev rule file, to be copied in /etc/udev/rules.d/ (as root). In its current form it makes the UR device available for r/w by all users -belonging to the 'plugdev' system group (standard Debian group for pluggable -devices). It may need changes, specific to your particular system's +belonging to the 'plugdev' system group (standard Debian/Ubuntu group for +pluggable devices). It may need changes, specific to your particular system's configuration. If in doubt, replacing GROUP="plugdev" with GROUP="" should just work. +After you copy the file to /etc/udev/rules.d (and possibly modify it for your +system), run 'udevadm control --reload-rules' as root for it to apply. Then +physically remove the Unifying Receiver, wait 30 seconds and re-insert it. + Thanks ------ diff --git a/lib/hidapi/udev.py b/lib/hidapi/udev.py index 0f4f3f57..8f1e7b6f 100644 --- a/lib/hidapi/udev.py +++ b/lib/hidapi/udev.py @@ -1,7 +1,11 @@ -# -# Partial Python implementation of the native hidapi. -# Requires pyudev -# +"""Generic Human Interface Device API. + +It is currently a partial pure-Python implementation of the native HID API +implemented by signal11 (https://github.com/signal11/hidapi), and requires +``pyudev``. +The docstrings are mostly copied from the hidapi API header, with changes where +necessary. +""" import os as _os from select import select as _select diff --git a/rules.d/99-logitech-unifying-receiver.rules b/rules.d/99-logitech-unifying-receiver.rules index fca3ecd4..d34343f9 100644 --- a/rules.d/99-logitech-unifying-receiver.rules +++ b/rules.d/99-logitech-unifying-receiver.rules @@ -6,19 +6,6 @@ # Make sure the plugdev group exists on your system and your user is a member # before applying these rules. - -# If you are using the libusb implementation of hidapi (hid-libusb.c), then -# use something like the following line, substituting the VID and PID with -# those of your device. Note that for kernels before 2.6.24, you will need -# to substitute "usb" with "usb_device". It shouldn't hurt to use two lines -# (one each way) for compatibility with older systems. - -# HIDAPI/libusb -ACTION=="add", SUBSYSTEM=="usb", ATTR{idVendor}=="046d", ATTR{idProduct}=="c52b", GROUP="plugdev", MODE="0660" - -# If you are using the hidraw implementation, then do something like the -# following, substituting the VID and PID with your device. - # HIDAPI/hidraw ACTION=="add", KERNEL=="hidraw*", ATTRS{idVendor}=="046d", ATTRS{idProduct}=="c52b", GROUP="plugdev", MODE="0660"