mirror of
https://github.com/go-vgo/robotgo.git
synced 2025-06-02 23:23:55 +00:00
Update Doc
This commit is contained in:
parent
760c6af302
commit
cddd083cea
@ -151,12 +151,12 @@ import (
|
|||||||
)
|
)
|
||||||
|
|
||||||
func main() {
|
func main() {
|
||||||
keve := robotgo.LEvent("k")
|
keve := robotgo.AddEvent("k")
|
||||||
if keve == 0 {
|
if keve == 0 {
|
||||||
Println("you press...", "k")
|
Println("you press...", "k")
|
||||||
}
|
}
|
||||||
|
|
||||||
mleft := robotgo.LEvent("mleft")
|
mleft := robotgo.AddEvent("mleft")
|
||||||
if mleft == 0 {
|
if mleft == 0 {
|
||||||
Println("you press...", "mouse left button")
|
Println("you press...", "mouse left button")
|
||||||
}
|
}
|
||||||
|
@ -148,12 +148,12 @@ import (
|
|||||||
)
|
)
|
||||||
|
|
||||||
func main() {
|
func main() {
|
||||||
keve := robotgo.LEvent("k")
|
keve := robotgo.AddEvent("k")
|
||||||
if keve == 0 {
|
if keve == 0 {
|
||||||
Println("you press...", "k")
|
Println("you press...", "k")
|
||||||
}
|
}
|
||||||
|
|
||||||
mleft := robotgo.LEvent("mleft")
|
mleft := robotgo.AddEvent("mleft")
|
||||||
if mleft == 0 {
|
if mleft == 0 {
|
||||||
Println("you press...", "mouse left button")
|
Println("you press...", "mouse left button")
|
||||||
}
|
}
|
||||||
|
9
doc.md
9
doc.md
@ -40,7 +40,8 @@
|
|||||||
|
|
||||||
##[Event](#Event)
|
##[Event](#Event)
|
||||||
|
|
||||||
#####[LEvent](#LEvent)
|
#####[LEvent](#LEvent)(Equivalent to AddEvent)
|
||||||
|
#####[AddEvent](#AddEvent)
|
||||||
|
|
||||||
##[Window](#Window)
|
##[Window](#Window)
|
||||||
This is a work in progress.
|
This is a work in progress.
|
||||||
@ -339,7 +340,7 @@ robotgo.ScrollMouse(50, "down")
|
|||||||
|
|
||||||
##<h2 id="Event">Event</h2>
|
##<h2 id="Event">Event</h2>
|
||||||
|
|
||||||
###<h3 id="LEvent">.LEvent(string)</h3>
|
###<h3 id="AddEvent">.AddEvent(string)</h3>
|
||||||
|
|
||||||
Listening global event
|
Listening global event
|
||||||
|
|
||||||
@ -365,12 +366,12 @@ import (
|
|||||||
)
|
)
|
||||||
|
|
||||||
func main() {
|
func main() {
|
||||||
keve := robotgo.LEvent("k")
|
keve := robotgo.AddEvent("k")
|
||||||
if keve == 0 {
|
if keve == 0 {
|
||||||
Println("you press...", "k")
|
Println("you press...", "k")
|
||||||
}
|
}
|
||||||
|
|
||||||
mleft := robotgo.LEvent("mleft")
|
mleft := robotgo.AddEvent("mleft")
|
||||||
if mleft == 0 {
|
if mleft == 0 {
|
||||||
Println("you press...", "mouse left button")
|
Println("you press...", "mouse left button")
|
||||||
}
|
}
|
||||||
|
@ -40,7 +40,8 @@
|
|||||||
|
|
||||||
##[事件](#Event)
|
##[事件](#Event)
|
||||||
|
|
||||||
#####[LEvent](#LEvent)
|
#####[LEvent](#LEvent)(相当于AddEvent)
|
||||||
|
#####[AddEvent](#AddEvent)
|
||||||
|
|
||||||
##[Window](#Window)
|
##[Window](#Window)
|
||||||
This is a work in progress.
|
This is a work in progress.
|
||||||
@ -353,7 +354,7 @@ robotgo.ScrollMouse(50, "down")
|
|||||||
```
|
```
|
||||||
##<h2 id="Event">事件</h2>
|
##<h2 id="Event">事件</h2>
|
||||||
|
|
||||||
###<h3 id="LEvent">.LEvent(string)</h3>
|
###<h3 id="AddEvent">.AddEvent(string)</h3>
|
||||||
|
|
||||||
监听全局事件
|
监听全局事件
|
||||||
|
|
||||||
@ -379,12 +380,12 @@ import (
|
|||||||
)
|
)
|
||||||
|
|
||||||
func main() {
|
func main() {
|
||||||
keve := robotgo.LEvent("k")
|
keve := robotgo.AddEvent("k")
|
||||||
if keve == 0 {
|
if keve == 0 {
|
||||||
Println("you press...", "k")
|
Println("you press...", "k")
|
||||||
}
|
}
|
||||||
|
|
||||||
mleft := robotgo.LEvent("mleft")
|
mleft := robotgo.AddEvent("mleft")
|
||||||
if mleft == 0 {
|
if mleft == 0 {
|
||||||
Println("you press...", "mouse left button")
|
Println("you press...", "mouse left button")
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user