Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Inconsistent key detection bug #662

Open
GodGavin opened this issue Jun 15, 2024 · 1 comment
Open

Inconsistent key detection bug #662

GodGavin opened this issue Jun 15, 2024 · 1 comment

Comments

@GodGavin
Copy link

  • 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
...

@auuunya
Copy link

auuunya commented Jun 19, 2024

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants