hid

package
v0.3.3 Latest Latest
Warning

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

Go to latest
Published: Jan 19, 2024 License: MIT Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	WindowLeftX   = 0
	WindowTopY    = 0
	GameAreaSizeX = 0
	GameAreaSizeY = 0
)

Functions

func Click

func Click(btn MouseButton)

Click just does a single mouse click at current pointer position

func KeyDown

func KeyDown(key string)

func KeyUp

func KeyUp(key string)

func MovePointer

func MovePointer(x, y int)

MovePointer moves the mouse to the requested position, x and y should be the final position based on pixels shown in the screen. Top-left corner is 0,0

func PressKey

func PressKey(key string)

PressKey toggles a key, it holds the key between keyPressMinTime and keyPressMaxTime ms randomly

func PressKeyCombination

func PressKeyCombination(keys ...string)

Types

type MouseButton

type MouseButton string
const (
	RightButton MouseButton = "right"
	LeftButton  MouseButton = "left"
)

Jump to

Keyboard shortcuts

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