support for the VX Nano mouse
This commit is contained in:
parent
1a36ec65ee
commit
ca9825d262
|
@ -73,6 +73,7 @@ class DeviceUnreachable(_KwException):
|
||||||
DEVICE_UNIFYING_RECEIVER = (0x046d, 0xc52b, 2, 'logitech-djreceiver')
|
DEVICE_UNIFYING_RECEIVER = (0x046d, 0xc52b, 2, 'logitech-djreceiver')
|
||||||
DEVICE_UNIFYING_RECEIVER_2 = (0x046d, 0xc532, 2, 'logitech-djreceiver')
|
DEVICE_UNIFYING_RECEIVER_2 = (0x046d, 0xc532, 2, 'logitech-djreceiver')
|
||||||
DEVICE_NANO_RECEIVER_ADVANCED = (0x046d, 0xc52f, 1, 'hid-generic')
|
DEVICE_NANO_RECEIVER_ADVANCED = (0x046d, 0xc52f, 1, 'hid-generic')
|
||||||
|
DEVICE_VXNANO = (0x046d, 0xc526, 1, 'hid-generic')
|
||||||
|
|
||||||
|
|
||||||
def receivers():
|
def receivers():
|
||||||
|
@ -83,6 +84,8 @@ def receivers():
|
||||||
yield d
|
yield d
|
||||||
for d in _hid.enumerate(*DEVICE_NANO_RECEIVER_ADVANCED):
|
for d in _hid.enumerate(*DEVICE_NANO_RECEIVER_ADVANCED):
|
||||||
yield d
|
yield d
|
||||||
|
for d in _hid.enumerate(*DEVICE_VXNANO):
|
||||||
|
yield d
|
||||||
|
|
||||||
|
|
||||||
def notify_on_receivers_glib(callback):
|
def notify_on_receivers_glib(callback):
|
||||||
|
@ -91,6 +94,7 @@ def notify_on_receivers_glib(callback):
|
||||||
DEVICE_UNIFYING_RECEIVER,
|
DEVICE_UNIFYING_RECEIVER,
|
||||||
DEVICE_UNIFYING_RECEIVER_2,
|
DEVICE_UNIFYING_RECEIVER_2,
|
||||||
DEVICE_NANO_RECEIVER_ADVANCED,
|
DEVICE_NANO_RECEIVER_ADVANCED,
|
||||||
|
DEVICE_VXNANO,
|
||||||
)
|
)
|
||||||
|
|
||||||
#
|
#
|
||||||
|
|
|
@ -153,13 +153,6 @@ _D('Wireless Illuminated Keyboard K800', protocol=1.0,
|
||||||
|
|
||||||
# Mice
|
# Mice
|
||||||
|
|
||||||
# _D('VX Nano Cordless Laser Mouse', product_id='c526', codename='VXNano',
|
|
||||||
# registers={'battery_charge': 0x0D},
|
|
||||||
# settings=[
|
|
||||||
# _register_smooth_scroll(0x01, true_value=0x40, mask=0x40),
|
|
||||||
# ],
|
|
||||||
# )
|
|
||||||
|
|
||||||
_D('Wireless Mouse M215', protocol=1.0)
|
_D('Wireless Mouse M215', protocol=1.0)
|
||||||
_D('Wireless Mouse M315')
|
_D('Wireless Mouse M315')
|
||||||
_D('Wireless Mouse M325')
|
_D('Wireless Mouse M325')
|
||||||
|
@ -204,5 +197,16 @@ _D('Wireless Trackball M570')
|
||||||
|
|
||||||
_D('Wireless Rechargeable Touchpad T650')
|
_D('Wireless Rechargeable Touchpad T650')
|
||||||
|
|
||||||
|
#
|
||||||
|
# classic Nano devices
|
||||||
|
# a product_id is necessary to properly identify them
|
||||||
|
#
|
||||||
|
|
||||||
|
_D('VX Nano Cordless Laser Mouse', codename='VX Nano', protocol=1.0, product_id='c526',
|
||||||
|
registers={'battery_charge': 0x0D, 'battery_status': -0x07},
|
||||||
|
settings=[
|
||||||
|
_register_smooth_scroll(0x01, true_value=0x40, mask=0x40),
|
||||||
|
],
|
||||||
|
)
|
||||||
|
|
||||||
del namedtuple
|
del namedtuple
|
||||||
|
|
|
@ -1,3 +1,5 @@
|
||||||
|
# This rule was added by Solaar.
|
||||||
|
#
|
||||||
# Allows non-root users to have raw access the Logitech Unifying USB Receiver
|
# Allows non-root users to have raw access the Logitech Unifying USB Receiver
|
||||||
# device. For development purposes, allowing users to write to the receiver is
|
# device. For development purposes, allowing users to write to the receiver is
|
||||||
# potentially dangerous (e.g. perform firmware updates).
|
# potentially dangerous (e.g. perform firmware updates).
|
||||||
|
@ -5,13 +7,16 @@
|
||||||
ACTION != "add", GOTO="solaar_end"
|
ACTION != "add", GOTO="solaar_end"
|
||||||
SUBSYSTEM != "hidraw", GOTO="solaar_end"
|
SUBSYSTEM != "hidraw", GOTO="solaar_end"
|
||||||
|
|
||||||
# Unifying receiver
|
# official Unifying receivers
|
||||||
ATTRS{idVendor}=="046d", ATTRS{idProduct}=="c52b", GOTO="solaar_apply"
|
ATTRS{idVendor}=="046d", ATTRS{idProduct}=="c52b", GOTO="solaar_apply"
|
||||||
ATTRS{idVendor}=="046d", ATTRS{idProduct}=="c532", GOTO="solaar_apply"
|
ATTRS{idVendor}=="046d", ATTRS{idProduct}=="c532", GOTO="solaar_apply"
|
||||||
|
|
||||||
# Nano receiver, "Unifying ready"
|
# Nano receiver, "Unifying ready"
|
||||||
ATTRS{idVendor}=="046d", ATTRS{idProduct}=="c52f", GOTO="solaar_apply"
|
ATTRS{idVendor}=="046d", ATTRS{idProduct}=="c52f", GOTO="solaar_apply"
|
||||||
|
|
||||||
|
# classic Nano receiver -- VX Nano mouse
|
||||||
|
ATTRS{idVendor}=="046d", ATTRS{idProduct}=="c526", GOTO="solaar_apply"
|
||||||
|
|
||||||
GOTO="solaar_end"
|
GOTO="solaar_end"
|
||||||
|
|
||||||
#
|
#
|
||||||
|
@ -19,7 +24,7 @@ GOTO="solaar_end"
|
||||||
#
|
#
|
||||||
LABEL="solaar_apply"
|
LABEL="solaar_apply"
|
||||||
|
|
||||||
# don't apply to the paired devices, just the receivers
|
# don't apply to the paired peripherals, just the receivers
|
||||||
DRIVERS=="logitech-djdevice", GOTO="solaar_end"
|
DRIVERS=="logitech-djdevice", GOTO="solaar_end"
|
||||||
|
|
||||||
# if the package configuration does not want the plugdev group, don't change the
|
# if the package configuration does not want the plugdev group, don't change the
|
||||||
|
|
|
@ -1,20 +1,29 @@
|
||||||
|
# This rule was added by Solaar.
|
||||||
|
#
|
||||||
# Allows non-root users to have raw access the Logitech Unifying USB Receiver
|
# Allows non-root users to have raw access the Logitech Unifying USB Receiver
|
||||||
# device. For development purposes, allowing users to write to the receiver is
|
# device. For development purposes, allowing users to write to the receiver is
|
||||||
# potentially dangerous (e.g. perform firmware updates).
|
# potentially dangerous (e.g. perform firmware updates).
|
||||||
|
|
||||||
# skip actual unified devices, only consider the receiver
|
ACTION != "add", GOTO="solaar_end"
|
||||||
DRIVERS=="logitech-djdevice", GOTO="not_unify_recv"
|
SUBSYSTEM != "hidraw", GOTO="solaar_end"
|
||||||
|
|
||||||
# official Unifying receivers
|
# official Unifying receivers
|
||||||
SUBSYSTEM=="hidraw", ATTRS{idVendor}=="046d", ATTRS{idProduct}=="c52b", GOTO="unify_dev"
|
ATTRS{idVendor}=="046d", ATTRS{idProduct}=="c52b", GOTO="solaar_apply"
|
||||||
SUBSYSTEM=="hidraw", ATTRS{idVendor}=="046d", ATTRS{idProduct}=="c532", GOTO="unify_dev"
|
ATTRS{idVendor}=="046d", ATTRS{idProduct}=="c532", GOTO="solaar_apply"
|
||||||
|
|
||||||
# "Unifying Ready" Nano receiver
|
# Nano receiver, "Unifying Ready"
|
||||||
SUBSYSTEM=="hidraw", ATTRS{idVendor}=="046d", ATTRS{idProduct}=="c52f", GOTO="unify_dev"
|
ATTRS{idVendor}=="046d", ATTRS{idProduct}=="c52f", GOTO="solaar_apply"
|
||||||
|
|
||||||
GOTO="not_unify_recv"
|
# clasic Nano receiver -- VX Nano mouse
|
||||||
|
ATTRS{idVendor}=="046d", ATTRS{idProduct}=="c526", GOTO="solaar_apply"
|
||||||
|
|
||||||
|
GOTO="solaar_end"
|
||||||
|
|
||||||
|
LABEL="solaar_apply"
|
||||||
|
|
||||||
|
# don't apply to the paired peripherals, just the receivers
|
||||||
|
DRIVERS=="logitech-djdevice", GOTO="solaar_end"
|
||||||
|
|
||||||
LABEL="unify_dev"
|
|
||||||
# Allow any seated user to access the receiver.
|
# Allow any seated user to access the receiver.
|
||||||
# uaccess: modern ACL-enabled udev
|
# uaccess: modern ACL-enabled udev
|
||||||
# udev-acl: for Ubuntu 12.10 and older
|
# udev-acl: for Ubuntu 12.10 and older
|
||||||
|
@ -23,5 +32,5 @@ TAG+="uaccess", TAG+="udev-acl"
|
||||||
# Grant members of the "plugdev" group access to receiver (useful for SSH users)
|
# Grant members of the "plugdev" group access to receiver (useful for SSH users)
|
||||||
#MODE="0660", GROUP="plugdev"
|
#MODE="0660", GROUP="plugdev"
|
||||||
|
|
||||||
LABEL="not_unify_recv"
|
LABEL="solaar_end"
|
||||||
# vim: ft=udevrules
|
# vim: ft=udevrules
|
||||||
|
|
Loading…
Reference in New Issue