Skip to content

moveMouse

Moves the mouse pointer to the given web-contents coordinates using a trusted Electron pointer move.

A trusted move updates the real pointer state in the CSS engine, so :hover rules genuinely apply. This is the low-level primitive: it performs a single move and does not wait for any state to settle (callers poll their own readiness signal). Prefer hoverElement / unhoverElement for element-relative moves.

Import:

import { moveMouse } from 'obsidian-dev-utils/obsidian/desktop-trusted-input';

Signature:

function moveMouse(params: MoveMouseParams): void

Parameters:

ParameterTypeDescription
paramsMoveMouseParamsThe web-contents DIP coordinates to move to.

Returns: void


Links to this page: