implement global pointing device axis handling

This commit is contained in:
xs5871
2022-10-16 19:39:02 +00:00
committed by xs5871
parent 470f16c97f
commit 69d47343e8
3 changed files with 46 additions and 8 deletions

View File

@@ -33,6 +33,15 @@ ALL_NUMBER_ALIASES = tuple(f'N{x}' for x in ALL_NUMBERS)
debug = Debug(__name__)
class Axis:
def __init__(self, code: int) -> None:
self.code = code
self.delta = 0
def __repr__(self) -> str:
return f'Axis(code={self.code}, delta={self.delta})'
def maybe_make_key(
code: Optional[int],
names: Tuple[str, ...],