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

how to solve conflict #55

Open
1 of 3 tasks
Guo-Chenxu opened this issue Sep 23, 2024 · 0 comments
Open
1 of 3 tasks

how to solve conflict #55

Guo-Chenxu opened this issue Sep 23, 2024 · 0 comments

Comments

@Guo-Chenxu
Copy link

  • Gohook version (or commit ref): v0.41.0
  • Go version: 1.20.6
  • Gcc version: 14.1.0
  • Operating system and bit: windows 64bit
  • Resolution:
  • Can you reproduce the bug at Examples:
    • Yes (provide example code)
    • No
    • Not relevant
  • Provide example code:
package main

import (
	"fmt"

	"github.com/robotn/gohook"
)

func main() {
	fmt.Println("--- Add Event ---")
	add()
	fmt.Println("END!")
}

func add() {
	hook.Register(hook.KeyDown, []string{"ctrl", "shift", "t"}, func(e hook.Event) {
		fmt.Println("ok")
	})

	hook.Register(hook.KeyDown, []string{"ctrl", "shift", "e"}, func(e hook.Event) {
		hook.End()
	})

	s := hook.Start()
	<-hook.Process(s)
}
  • Log gist:

Description

hello, it works well, but i have some questions about the hot key conflict, can i make some settings to solve the conflict (let other apps ignore my operation) when i press the keys? For example, if the program above is running, when i type ctrl+shift+t in edge, i only want my program print ok, and dont want trigger the edge hot key.

Thanks for your help.

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

1 participant