settings: add diversion setting for hires scroll wheel and fix information about lowres scroll setting

This commit is contained in:
Peter F. Patel-Schneider 2022-04-14 22:21:46 -04:00
parent ffb9b2710b
commit cef531c7be
2 changed files with 24 additions and 14 deletions

View File

@ -267,15 +267,12 @@ _D('Wireless Mouse M150', protocol=2.0, wpid='4022')
_D('Wireless Mouse M185', protocol=2.0, wpid='4038')
_D('Wireless Mouse MX Master', codename='MX Master', protocol=4.5, wpid='4041', btid=0xb012)
_D('Anywhere Mouse MX 2', codename='Anywhere MX 2', protocol=4.5, wpid='404A', settings=[_ST.HiresSmoothInvert])
_D('Wireless Mouse M510', protocol=2.0, wpid='4051', codename='M510v2', settings=[_ST.LowresSmoothScroll])
_D('Wireless Mouse M185 new', codename='M185n', protocol=4.5, wpid='4054',
settings=[_ST.LowresSmoothScroll, _ST.PointerSpeed])
_D('Wireless Mouse M185/M235/M310', codename='M185/M235/M310', protocol=4.5, wpid='4055',
settings=[_ST.LowresSmoothScroll, _ST.PointerSpeed])
_D('Wireless Mouse M510', protocol=2.0, wpid='4051', codename='M510v2')
_D('Wireless Mouse M185 new', codename='M185n', protocol=4.5, wpid='4054')
_D('Wireless Mouse M185/M235/M310', codename='M185/M235/M310', protocol=4.5, wpid='4055')
_D('Wireless Mouse MX Master 2S', codename='MX Master 2S', protocol=4.5, wpid='4069', btid=0xb019,
settings=[_ST.HiresSmoothInvert])
_D('Multi Device Silent Mouse M585/M590', codename='M585/M590', protocol=4.5, wpid='406B',
settings=[_ST.LowresSmoothScroll, _ST.PointerSpeed])
_D('Multi Device Silent Mouse M585/M590', codename='M585/M590', protocol=4.5, wpid='406B')
_D('Marathon Mouse M705 (M-R0073)', codename='M705 (M-R0073)', protocol=4.5, wpid='406D',
settings=[_ST.HiresSmoothInvert, _ST.PointerSpeed])
_D('MX Vertical Wireless Mouse', codename='MX Vertical', protocol=4.5, wpid='407B', btid=0xb020, usbid=0xc08a)

View File

@ -237,11 +237,11 @@ class HiResScroll(_Setting):
feature = _F.HI_RES_SCROLLING
class LowresSmoothScroll(_Setting):
name = 'lowres-smooth-scroll'
class LowresMode(_Setting):
name = 'lowres-scroll-mode'
label = _('Scroll Wheel Diversion')
description = (
_('HID++ mode for vertical scroll with the wheel.') + '\n' + _('Effectively turns off wheel scrolling in Linux.')
description = _(
'Make scroll wheel send LOWRES_WHEEL HID++ notifications (which trigger Solaar rules but are otherwise ignored).'
)
feature = _F.LOWRES_WHEEL
@ -267,6 +267,17 @@ class HiresSmoothResolution(_Setting):
validator_options = {'true_value': 0x02, 'mask': 0x02}
class HiresMode(_Setting):
name = 'hires-scroll-mode'
label = _('Scroll Wheel Diversion')
description = _(
'Make scroll wheel send HIRES_WHEEL HID++ notifications (which trigger Solaar rules but are otherwise ignored).'
)
feature = _F.HIRES_WHEEL
rw_options = {'read_fnid': 0x10, 'write_fnid': 0x20}
validator_options = {'true_value': 0x01, 'mask': 0x01}
class PointerSpeed(_Setting):
name = 'pointer_speed'
label = _('Sensitivity (Pointer Speed)')
@ -281,8 +292,9 @@ class PointerSpeed(_Setting):
class ThumbMode(_Setting):
name = 'thumb-scroll-mode'
label = _('Thumb Wheel Diversion')
description = _('HID++ mode for horizontal scroll with the thumb wheel.') + '\n' + \
_('Effectively turns off thumb scrolling in Linux.')
description = _(
'Make thumb wheel send THUMB_WHEEL HID++ notifications (which trigger Solaar rules but are otherwise ignored).'
)
feature = _F.THUMB_WHEEL
rw_options = {'read_fnid': 0x10, 'write_fnid': 0x20}
validator_options = {'true_value': b'\x01\x00', 'false_value': b'\x00\x00', 'mask': b'\x01\x00'}
@ -1140,9 +1152,10 @@ SETTINGS = [
RegisterDpi,
RegisterFnSwap, # working
HiResScroll, # simple
LowresSmoothScroll, # simple
LowresMode, # simple
HiresSmoothInvert, # working
HiresSmoothResolution, # working
HiresMode, # simple
SmartShift, # working
SmartShiftEnhanced, # simple
ThumbMode, # working