mouse

package
v1.2.4 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jan 30, 2026 License: MIT Imports: 5 Imported by: 0

Documentation

Index

Constants

View Source
const (
	WM_MOUSEMOVE     = 0x0200
	WM_LBUTTONDOWN   = 0x0201
	WM_LBUTTONUP     = 0x0202
	WM_LBUTTONDBLCLK = 0x0203
	WM_RBUTTONDOWN   = 0x0204
	WM_RBUTTONUP     = 0x0205
	WM_RBUTTONDBLCLK = 0x0206
	WM_MBUTTONDOWN   = 0x0207
	WM_MBUTTONUP     = 0x0208
	WM_MBUTTONDBLCLK = 0x0209
	WM_MOUSEWHEEL    = 0x020A

	MK_LBUTTON = 0x0001
	MK_RBUTTON = 0x0002
	MK_MBUTTON = 0x0010

	WHEEL_DELTA = 120
)

Variables

View Source
var ErrInvalidScrollDelta = errors.New("scroll delta must be a multiple of WHEEL_DELTA (120)")

Functions

func Click

func Click(hwnd uintptr, x, y int32) error

Click simulates a left mouse button click at the specified client coordinates.

func ClickMiddle

func ClickMiddle(hwnd uintptr, x, y int32) error

ClickMiddle simulates a middle mouse button click at the specified client coordinates.

func ClickRight

func ClickRight(hwnd uintptr, x, y int32) error

ClickRight simulates a right mouse button click at the specified client coordinates.

func DoubleClick

func DoubleClick(hwnd uintptr, x, y int32) error

DoubleClick simulates a left mouse button double-click at the specified client coordinates.

func Move

func Move(hwnd uintptr, x, y int32) error

Move simulates a mouse move event to the specified client coordinates using PostMessage.

func Scroll

func Scroll(hwnd uintptr, x, y int32, delta int32) error

Scroll simulates a vertical mouse wheel scroll at the specified coordinates. delta must be a multiple of WHEEL_DELTA (120).

Types

This section is empty.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL