Relative (#18)

* refactoring

* basic relative mouse mode
This commit is contained in:
Maxim Devaev
2020-11-03 04:50:08 +03:00
committed by GitHub
parent 6ec82dde5d
commit 544f4b3fec
9 changed files with 246 additions and 85 deletions

View File

@@ -96,8 +96,8 @@ def valid_hid_mouse_button(arg: Any) -> str:
return check_string_in_list(arg, "HID mouse button", ["left", "right", "middle", "up", "down"])
def valid_hid_mouse_wheel(arg: Any) -> int:
arg = valid_number(arg, name="HID mouse wheel")
def valid_hid_mouse_delta(arg: Any) -> int:
arg = valid_number(arg, name="HID mouse delta")
return min(max(-127, arg), 127)