-
Notifications
You must be signed in to change notification settings - Fork 75
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
Generate and listen to global keyboard and mouse events? #42
Comments
@ufoscout If it can be done using standard X11, then it can be done with this library. That is, if you have an XCB program that does this, then it should be easy to port to XGB. The one exception is if you are using an extension not supported by XGB. You're on your own for the rest. :-) There are examples in xgbutil you might find helpful: https://github.com/BurntSushi/xgbutil |
@BurntSushi thanks for your rapid answer! |
Sorry, but I don't have time for that. X11 is a source of significant
complexity, so you will need to either learn the X11 protocol specifics
yourself (which translate directly to XGB since it is the thinnest possible
layer between you and the X protocol), or failing that, find some higher
level library.
The xgbutil repo has examples in it. Find them. Some of them work with
keypresses. I am on mobile otherwise I would send a direct link.
…On Feb 12, 2018 10:16 AM, "Francesco" ***@***.***> wrote:
@BurntSushi <https://github.com/burntsushi> thanks for your rapid answer!
My issue is that I know Go but I have absolutely zero experience of C and
X11 (and whatever else related to it).
Would it be possible to have a small code example? I checked the link you
posted but I am completely lost :(
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
<#42 (comment)>, or mute
the thread
<https://github.com/notifications/unsubscribe-auth/AAb34sHUKckKktgiEMrst9CmdSmDiGEZks5tUFW2gaJpZM4SCTIj>
.
|
I need to write a Go application that can:
When I say "global" I mean that the application runs in background and it should be able to listen to events on whatever window. For example, it should intercept everytime the user presses "ctrl+a" and the emit a series of key presses as if they were pressed by the user on his keyboard.
I wonder if what I need can be achieved with this library.
The text was updated successfully, but these errors were encountered: