summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--kvmd/plugins/hid/__init__.py2
-rw-r--r--kvmd/plugins/hid/_mcu/__init__.py9
-rw-r--r--web/share/js/kvm/mouse.js3
3 files changed, 9 insertions, 5 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))
diff --git a/web/share/js/kvm/mouse.js b/web/share/js/kvm/mouse.js
index 4f021e5c..bcfc7bf0 100644
--- a/web/share/js/kvm/mouse.js
+++ b/web/share/js/kvm/mouse.js
@@ -79,9 +79,6 @@ export function Mouse(record_callback) {
self.setState = function(state) {
__online = state.online;
- if (!("absolute" in state)) { // FIXME: SPI
- state.absolute = true;
- }
if (!__absolute && state.absolute && __isRelativeCaptured()) {
document.exitPointerLock();
}