mirror of
https://github.com/go-vgo/robotgo.git
synced 2025-06-01 14:43:55 +00:00
Fixed Mouse buttons reversed
left and right click were swapped so I changed that
This commit is contained in:
parent
ca32ffeb86
commit
10f2393123
@ -36,9 +36,9 @@ func addEvent() {
|
|||||||
func addMouse() {
|
func addMouse() {
|
||||||
fmt.Println("--- Please press left mouse button to see it's position and the right mouse button to exit ---")
|
fmt.Println("--- Please press left mouse button to see it's position and the right mouse button to exit ---")
|
||||||
robotgo.EventHook(hook.MouseDown, []string{}, func(e hook.Event) {
|
robotgo.EventHook(hook.MouseDown, []string{}, func(e hook.Event) {
|
||||||
if e.Button == hook.MouseMap["right"] {
|
if e.Button == hook.MouseMap["left"] {
|
||||||
fmt.Printf("mleft @ %v - %v\n", e.X, e.Y)
|
fmt.Printf("mleft @ %v - %v\n", e.X, e.Y)
|
||||||
} else if e.Button == hook.MouseMap["left"] {
|
} else if e.Button == hook.MouseMap["right"] {
|
||||||
robotgo.EventEnd()
|
robotgo.EventEnd()
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
|
Loading…
Reference in New Issue
Block a user