robotn / gohook

GoHook, Go global keyboard and mouse listener hook
MIT License
314 stars 44 forks source link

MouseEvent button are not same in different systems #29

Open DogeVenci opened 3 years ago

DogeVenci commented 3 years ago
hook.Register(hook.MouseDown, []string{}, func(e hook.Event) {
    log.Println("mouse down:",e.Button,hook.MouseMap["right"])
})

Click mouse right key on Windows and MacOS display e.button is 2, ubuntu20.04 is 3