summaryrefslogtreecommitdiff
path: root/kvmd/mouse.py
diff options
context:
space:
mode:
Diffstat (limited to 'kvmd/mouse.py')
-rw-r--r--kvmd/mouse.py10
1 files changed, 10 insertions, 0 deletions
diff --git a/kvmd/mouse.py b/kvmd/mouse.py
index 3fb76800..399c6a33 100644
--- a/kvmd/mouse.py
+++ b/kvmd/mouse.py
@@ -36,3 +36,13 @@ class MouseRange:
@classmethod
def normalize(cls, value: int) -> int:
return min(max(cls.MIN, value), cls.MAX)
+
+
+class MouseDelta:
+ MIN = -127
+ MAX = 127
+ RANGE = (MIN, MAX)
+
+ @classmethod
+ def normalize(cls, value: int) -> int:
+ return min(max(cls.MIN, value), cls.MAX)