dear developers of the fantastic ebiten,
thank you very much for your work and the easy to use GUI creation package.
could you please add global hotkey support?
i would like to react to hotkeys even when the ebiten window does not have focus.
Hi,
I'm not sure what is 'hotkey'.
i would like to react to hotkeys even when the ebiten window does not have focus.
Hmm, I think this is not Ebiten's responsibility but OS's responsibility.
please see https://github.com/glfw/glfw/issues/1204, it is explained better there
the last posts talks about "global hotkeys" that are already implemented... maybe this can be used?
OK so let's revisit after GLFW implements this since Ebiten depends on GLFW.
Thank you for using Ebiten!
Ebiten is a great way to have a gui and everything else. All the thanks to you. I just consume. :-)
Here I found the way to register global hotkeys for windows: https://stackoverflow.com/questions/38646794/implement-a-global-hotkey-in-golang
I will use this way for now since I only target windows atm.
@hajimehoshi please take a look at this: https://github.com/robotn/gohook
this exactly does what i need. a bit over-powered (a complete eventlogger for inputs) but already for three platforms.
i understood, you said you will take a look at it when GLFW implements something...
maybe someone else is hyped by ebiten and needs global inputs before that point of time. ;-)
So you can use this without waiting for Ebiten change?
Yes, did some testing yesterday on Win10 - no issues. tested today on Win7 in a very strict network and was very suprised that none of the security systems prevented this global hook... Not even local admin rights were needed.
Virustotal and Hybrid-Analysis also do not rate this way of realizing "global hotkeys" as suspicious.
Long answer shot: Yes.
My understanding is that this feature should be independent from Ebiten, so I'm afraid I would not introduce this.
Thank you for requests!