robotgo icon indicating copy to clipboard operation
robotgo copied to clipboard

hook.Start() cann't get the event when keydown F1/F2/F3

Open xuanyanwow opened this issue 2 years ago • 1 comments

  • Robotgo version (or commit ref): v1.0.0-beta1
  • Go version:1.16.6
  • Gcc version:10.3.0
  • Operating system and bit: windows10 64bit
  • Resolution:
  • Can you reproduce the bug at Examples:
    • [ ] Yes (provide example code)
    • [ ] No
    • [x] Not relevant
  • Provide example code:
// success
ok := hook.AddEvent("f1")
if ok {
  fmt.Println("add events...")
}

// fail
        evChan := hook.Start()
	defer hook.End()

	for ev := range evChan {
		fmt.Println("hook: ", ev)
	}
  • Log gist:

Description

use hook.Start() cann't get the event when keydown with f1/f2/f3/.../f12

xuanyanwow avatar Mar 10 '22 04:03 xuanyanwow

Supplement

fmt.Println(ev)

can get the event.but why is KeyHold, not is Keydown

{Kind: KeyHold, Rawcode: 112, Keychar: 65535} {Kind: KeyHold, Rawcode: 113, Keychar: 65535}

xuanyanwow avatar Mar 11 '22 14:03 xuanyanwow