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

ERROR: hotkey: xxx is registered #19

Closed
OlegGulevskyy opened this issue Nov 24, 2022 · 6 comments
Closed

ERROR: hotkey: xxx is registered #19

OlegGulevskyy opened this issue Nov 24, 2022 · 6 comments

Comments

@OlegGulevskyy
Copy link

OlegGulevskyy commented Nov 24, 2022

I am trying to use this library with wails GUI library and everytime I get the error message that a hotkey is registered
image

ERROR: hotkey: 109+4+1 is registered

X Error of failed request:  BadAccess (attempt to access private resource denied)
  Major opcode of failed request:  33 (X_GrabKey)
  Serial number of failed request:  10
  Current serial number in output stream:  11

exit status 1

no matter which key I am using with any modifier
not even sure where to look for some additional debuggin info, would you have any advice / help?

@changkun
Copy link
Member

I think this is a known issue, see #11

@OlegGulevskyy
Copy link
Author

So this means that there is no solution currently? Sorry I am far from familiar with native terms, so hard to understand the conclusion from the linked issue

@changkun
Copy link
Member

The reason for having this error is that someone else had registered this hotkey combination already. To solve it, guarantee the key combination does not conflict with others.

I think @ventsislav-georgiev worked on potential solutions before, but we have not converged to a satisfactory solution yet.

@OlegGulevskyy
Copy link
Author

So this means that if some app, somewhere somehow assigned a key bind and this app is not even active anymore / not listening for key use, this lib won't be able to use this shortcut anyway? Because I am assigning completely "random" shortcut making sure it is not used (when I use it nothing happens), it still returns an error

@changkun
Copy link
Member

I think if you already grabbed the combination for your application successfully, future registration won't impact your registration anymore.

I don't entirely sure how you did random shortcuts, but I am pretty confident that some combination will work. Otherwise, it should be a system issue rather than the library itself.

@OlegGulevskyy
Copy link
Author

Actually it was totally my bad, I was misusing the library - instantiating it in the wrong place of execution :) Thank you for your help though!

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