robotgo icon indicating copy to clipboard operation
robotgo copied to clipboard

robotgo.AddEvent("mleft") also executes if the "right arrow" key is pressed

Open JojiiOfficial opened this issue 6 years ago • 1 comments

  • Robotgo version (or commit ref): b5f6d20a74992f444c197b4b13cf853454677004
  • Go version: 1.13
  • Gcc version: 8.3.0
  • Operating system and bit: Debian 64bit
  • Resolution: 2880x1620
  • Can you reproduce the bug at Examples:
    • [X] Yes (provide example code)
    • [ ] No
    • [ ] Not relevant

This event fires on left-mouse-button and on pressing "arrow - right" on my keyboard. But I guess it should only run if the left-mouse-button is pressed?

for {
	lmb := robotgo.AddEvent("mleft")
	if lmb {
	    fmt.Println("click")
        }
}

JojiiOfficial avatar Oct 21 '19 14:10 JojiiOfficial

Getting this issue aswell, any way to exclude the right arrow key from event?

Fixed for now just by using gohook directly via for ev := range EvChan { if ev.Kind == hook.MouseDown && ev.Button == hook.MouseMap["left"] {

Trey2k avatar Mar 12 '21 21:03 Trey2k