diff options
author | Maxim Devaev <[email protected]> | 2025-01-10 23:04:12 +0200 |
---|---|---|
committer | Maxim Devaev <[email protected]> | 2025-01-10 23:04:12 +0200 |
commit | e7c06643b4a43c1d35bd2c3aaf4326547084b091 (patch) | |
tree | 7abb1ac834d3fa1685bf14af31a596397911b0c5 /kvmd/mouse.py | |
parent | 72c9ae3aa00b8817fab2b8243203ca6e1c25e146 (diff) |
refactoring
Diffstat (limited to 'kvmd/mouse.py')
-rw-r--r-- | kvmd/mouse.py | 10 |
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) |