robotgo icon indicating copy to clipboard operation
robotgo copied to clipboard

Inconsistent key detection bug

Open GodGavin opened this issue 1 year ago • 1 comments

  • Robotgo version (or commit ref):
  • Go version:1.17
  • Gcc version:
  • Operating system and bit:windows10 64bit
  • Provide example code:
robotgo.EventHook(hook.KeyDown, []string{"command", "m"}, func(e hook.Event) {
			// soemtimes trigger by only m direct ????
			expectedrawcode := hook.KeychartoRawcode("m")
			println(expectedrawcode)
			if e.Rawcode == expectedrawcode {
			timespeakImplementation()
			fmt.Println("timespeak execued")
			//robotgo.EventEnd()
			}
		})

Description

hey,i need help,thanks.In the code above,i use robotgo detecting keydown ,when the key windows+m pressed,then call a function,but Occasionally, even without pressing the Windows key, just pressing the M key triggers the event,i found this when typing characters in the text input boxes of other programs, use the built-in input method of Windows 10. This has happened many times. Why is this? Is it an issue with how I'm calling the code, or is it a bug in robotgo?tanks again the full code is here github:https://github.com/GodGavin/winsleep/blob/master/main.go ...

GodGavin avatar Jun 15 '24 07:06 GodGavin

https://learn.microsoft.com/zh-cn/windows/win32/learnwin32/accelerator-tables

auuunya avatar Jun 19 '24 00:06 auuunya