Documentation
¶
Index ¶
Constants ¶
View Source
const ( // Version get the gohook version Version = "v0.31.2.113, Sierra Nevada!" // HookEnabled honk enable status HookEnabled = 1 // iota HookDisabled = 2 KeyDown = 3 KeyHold = 4 KeyUp = 5 MouseUp = 6 MouseHold = 7 MouseDown = 8 MouseMove = 9 MouseDrag = 10 MouseWheel = 11 FakeEvent = 12 // Keychar could be v CharUndefined = 0xFFFF WheelUp = -1 WheelDown = 1 )
Variables ¶
View Source
var Keycode = keycode.Keycode
Keycode robotgo hook key's code map
View Source
var MouseMap = keycode.MouseMap
MouseMap robotgo hook mouse's code map
View Source
var Special = keycode.Special
Special is the special key map
Functions ¶
func KeychartoRawcode ¶
KeychartoRawcode key char to rawcode
Types ¶
type Event ¶
type Event struct {
Kind uint8 `json:"id"`
When time.Time
Mask uint16 `json:"mask"`
Reserved uint16 `json:"reserved"`
Keycode uint16 `json:"keycode"`
Rawcode uint16 `json:"rawcode"`
Keychar rune `json:"keychar"`
Button uint16 `json:"button"`
Clicks uint16 `json:"clicks"`
X int16 `json:"x"`
Y int16 `json:"y"`
Amount uint16 `json:"amount"`
Rotation int32 `json:"rotation"`
Direction uint8 `json:"direction"`
}
Event Holds a system event
If it's a Keyboard event the relevant fields are: Mask, Keycode, Rawcode, and Keychar, Keychar is probably what you want.
If it's a Mouse event the relevant fields are: Button, Clicks, X, Y, Amount, Rotation and Direction
Click to show internal directories.
Click to hide internal directories.