hid

package
v0.4.0-beta1 Latest Latest
Warning

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

Go to latest
Published: Feb 19, 2024 License: MIT Imports: 7 Imported by: 0

Documentation

Index

Constants

View Source
const (
	RightButton MouseButton = win.MK_RBUTTON
	LeftButton  MouseButton = win.MK_LBUTTON

	ShiftKey ModifierKey = win.VK_SHIFT
	CtrlKey  ModifierKey = win.VK_CONTROL
)

Variables

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

Functions

func Click

func Click(btn MouseButton, x, y int)

Click just does a single mouse click at current pointer position

func ClickWithModifier

func ClickWithModifier(btn MouseButton, x, y int, modifier ModifierKey)

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

Types

type Changeable

type Changeable interface {
	Set(x, y int, c color.Color)
}

type ModifierKey

type ModifierKey uint

type MouseButton

type MouseButton uint

Jump to

Keyboard shortcuts

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