summaryrefslogtreecommitdiff
path: root/kvmd/plugins
diff options
context:
space:
mode:
authorDevaev Maxim <[email protected]>2020-11-12 23:40:39 +0300
committerDevaev Maxim <[email protected]>2020-11-12 23:40:39 +0300
commit65c6abee249bfb7e2d50e4f734d93f422118cb61 (patch)
treef2e40c6cc5a546ba0250220fafcc55235a707e49 /kvmd/plugins
parent180251ec591245ca2025341214e255e3952184d7 (diff)
hid plugins fix
Diffstat (limited to 'kvmd/plugins')
-rw-r--r--kvmd/plugins/hid/__init__.py2
-rw-r--r--kvmd/plugins/hid/_mcu/__init__.py9
2 files changed, 9 insertions, 2 deletions
diff --git a/kvmd/plugins/hid/__init__.py b/kvmd/plugins/hid/__init__.py
index ec187578..f57379aa 100644
--- a/kvmd/plugins/hid/__init__.py
+++ b/kvmd/plugins/hid/__init__.py
@@ -60,7 +60,7 @@ class BaseHid(BasePlugin):
raise NotImplementedError
def send_mouse_relative_event(self, delta_x: int, delta_y: int) -> None:
- pass # FIXME: SPI
+ raise NotImplementedError
def send_mouse_wheel_event(self, delta_x: int, delta_y: int) -> None:
raise NotImplementedError
diff --git a/kvmd/plugins/hid/_mcu/__init__.py b/kvmd/plugins/hid/_mcu/__init__.py
index 3f925cd8..48ba8fde 100644
--- a/kvmd/plugins/hid/_mcu/__init__.py
+++ b/kvmd/plugins/hid/_mcu/__init__.py
@@ -236,7 +236,10 @@ class BaseMcuHid(BaseHid, multiprocessing.Process): # pylint: disable=too-many-
"num": state["num"],
},
},
- "mouse": {"online": state["online"]},
+ "mouse": {
+ "online": state["online"],
+ "absolute": True,
+ },
}
async def poll_state(self) -> AsyncGenerator[Dict, None]:
@@ -283,6 +286,10 @@ class BaseMcuHid(BaseHid, multiprocessing.Process): # pylint: disable=too-many-
def send_mouse_move_event(self, to_x: int, to_y: int) -> None:
self.__queue_event(_MouseMoveEvent(to_x, to_y))
+ def send_mouse_relative_event(self, delta_x: int, delta_y: int) -> None:
+ _ = delta_x # No relative events yet
+ _ = delta_y
+
def send_mouse_wheel_event(self, delta_x: int, delta_y: int) -> None:
self.__queue_event(_MouseWheelEvent(delta_x, delta_y))