summaryrefslogtreecommitdiff
path: root/kvmd/validators
diff options
context:
space:
mode:
authorDevaev Maxim <[email protected]>2021-03-26 05:19:02 +0300
committerDevaev Maxim <[email protected]>2021-03-26 05:19:02 +0300
commite24228b8751f9f4152c4c76f5644f4e57607bf1f (patch)
tree92dfcf9fcb2122578964e15390ff7bb8100f3ee4 /kvmd/validators
parent7f23f82a0d4147c2ce2369614827b9f8b583a234 (diff)
mouse input range
Diffstat (limited to 'kvmd/validators')
-rw-r--r--kvmd/validators/hid.py4
1 files changed, 2 insertions, 2 deletions
diff --git a/kvmd/validators/hid.py b/kvmd/validators/hid.py
index b51ff88a..bb7e26e1 100644
--- a/kvmd/validators/hid.py
+++ b/kvmd/validators/hid.py
@@ -42,9 +42,9 @@ def valid_hid_key(arg: Any) -> str:
return check_string_in_list(arg, "Keyboard key", KEYMAP, lower=False)
-def valid_hid_mouse_move(arg: Any) -> int:
+def valid_hid_mouse_move(arg: Any, move_min: int=-32768, move_max: int=32767) -> int:
arg = valid_number(arg, name="Mouse move")
- return min(max(-32768, arg), 32767)
+ return min(max(move_min, arg), move_max)
def valid_hid_mouse_button(arg: Any) -> str: