Skip to main content
Deno 2 is finally here 🎉️
Learn more
Module

x/litebot/mod.ts>setMousePos

A Deno library for interacting with the mouse 🖱️ keyboard ⌨️ and screen 💻. Provides a simple API for creating kbm events, macros, & working with displays. Leverages FFI & C providing high performance while maintaining a simple TypeScript API
Latest
variable setMousePos
import { setMousePos } from "https://deno.land/x/litebot@v0.4.4/mod.ts";

Set the mouse location with screen-space x, y cordinates. The function can fail if the caller passes in bounds that do not exists. However this will simply move the mouse to the edge of the screen.

Examples

setMousePos (0, 0) - true // successful call setMousePos (10000, 0) // unsuccessful call // will simply move to the furthest possible area of the screen before leaving thew screen's bounds.

type

(x: number, y: number) => void