Skip to content
Tauri

cursorPosition

cursorPosition(): Promise<PhysicalPosition>

Defined in: window.ts:2528

Get the cursor position relative to the top-left hand corner of the desktop.

Note that the top-left hand corner of the desktop is not necessarily the same as the screen. If the user uses a desktop with multiple monitors, the top-left hand corner of the desktop is the top-left hand corner of the main monitor on Windows and macOS or the top-left of the leftmost monitor on X11.

The coordinates can be negative if the top-left hand corner of the window is outside of the visible screen region.

Promise<PhysicalPosition>


© 2025 Tauri Contributors. CC-BY / MIT