summaryrefslogtreecommitdiff
path: root/kvmd/server.py
diff options
context:
space:
mode:
Diffstat (limited to 'kvmd/server.py')
-rw-r--r--kvmd/server.py8
1 files changed, 8 insertions, 0 deletions
diff --git a/kvmd/server.py b/kvmd/server.py
index efdb48c0..47dddf78 100644
--- a/kvmd/server.py
+++ b/kvmd/server.py
@@ -141,6 +141,8 @@ class Server: # pylint: disable=too-many-instance-attributes
app.router.add_get("/ws", self.__ws_handler)
+ app.router.add_post("/hid/reset", self.__hid_reset_handler)
+
app.router.add_get("/atx", self.__atx_state_handler)
app.router.add_post("/atx/click", self.__atx_click_handler)
@@ -228,6 +230,12 @@ class Server: # pylint: disable=too-many-instance-attributes
return
await self.__hid.send_mouse_wheel_event(delta_y)
+ # ===== HID
+
+ async def __hid_reset_handler(self, _: aiohttp.web.Request) -> aiohttp.web.Response:
+ await self.__hid.reset()
+ return _json()
+
# ===== ATX
async def __atx_state_handler(self, _: aiohttp.web.Request) -> aiohttp.web.Response: