mirror of
https://github.com/go-vgo/robotgo
synced 2026-05-24 10:19:01 +00:00
Merge pull request #284 from T4O2M0/patch-1
Fixed Mouse buttons reversed
This commit is contained in:
commit
11ccaad187
1 changed files with 2 additions and 2 deletions
|
|
@ -36,9 +36,9 @@ func addEvent() {
|
|||
func addMouse() {
|
||||
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) {
|
||||
if e.Button == hook.MouseMap["right"] {
|
||||
if e.Button == hook.MouseMap["left"] {
|
||||
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()
|
||||
}
|
||||
})
|
||||
|
|
|
|||
Loading…
Reference in a new issue