mirror of
https://github.com/mofeng-git/One-KVM.git
synced 2026-01-29 00:51:53 +08:00
pikvm/pikvm#1537: /hid/inactivity api
This commit is contained in:
@@ -102,6 +102,11 @@ class HidApi:
|
||||
await self.__hid.reset()
|
||||
return make_json_response()
|
||||
|
||||
@exposed_http("GET", "/hid/inactivity")
|
||||
async def __inactivity_handler(self, _: Request) -> Response:
|
||||
secs = self.__hid.get_inactivity_seconds()
|
||||
return make_json_response({"inactivity": secs})
|
||||
|
||||
# =====
|
||||
|
||||
async def get_keymaps(self) -> dict: # Ugly hack to generate hid_keymaps_state (see server.py)
|
||||
|
||||
Reference in New Issue
Block a user