diff options
author | Devaev Maxim <[email protected]> | 2020-12-24 15:49:23 +0300 |
---|---|---|
committer | Devaev Maxim <[email protected]> | 2020-12-24 15:49:23 +0300 |
commit | edb967c633487c90846a6df69adb3842a91fd95c (patch) | |
tree | bca84753053372e66fff092ad1af24fc8da38a71 /kvmd/apps | |
parent | 4b6d7605c515adb6b14875f48e7066b1ddcc8948 (diff) |
hid set_connected api
Diffstat (limited to 'kvmd/apps')
-rw-r--r-- | kvmd/apps/kvmd/api/hid.py | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/kvmd/apps/kvmd/api/hid.py b/kvmd/apps/kvmd/api/hid.py index a988ab34..9c39ab20 100644 --- a/kvmd/apps/kvmd/api/hid.py +++ b/kvmd/apps/kvmd/api/hid.py @@ -79,6 +79,11 @@ class HidApi: self.__hid.set_mouse_output(valid_hid_mouse_output(request.query.get("output"))) return make_json_response() + @exposed_http("POST", "/hid/set_connected") + async def __set_connected_handler(self, request: Request) -> Response: + self.__hid.set_connected(valid_bool(request.query.get("connected"))) + return make_json_response() + @exposed_http("POST", "/hid/reset") async def __reset_handler(self, _: Request) -> Response: await self.__hid.reset() |