hid set_connected api

This commit is contained in:
Devaev Maxim
2020-12-24 15:49:23 +03:00
parent 4b6d7605c5
commit edb967c633
6 changed files with 31 additions and 7 deletions

View File

@@ -82,6 +82,15 @@ class SetMouseOutputEvent(BaseEvent):
return _make_request(struct.pack(">BBxxx", 0x04, _MOUSE_NAMES_TO_CODES.get(self.mouse, 0)))
# =====
@dataclasses.dataclass(frozen=True)
class SetConnectedEvent(BaseEvent):
connected: bool
def make_request(self) -> bytes:
return _make_request(struct.pack(">BBxxx", 0x05, int(self.connected)))
# =====
class ClearEvent(BaseEvent):
def make_request(self) -> bytes: