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

Input interception? #7

Open
rogueyoshi opened this issue Oct 13, 2017 · 1 comment
Open

Input interception? #7

rogueyoshi opened this issue Oct 13, 2017 · 1 comment

Comments

@rogueyoshi
Copy link

Is it currently possible to intercept keyboard/mouse events? What I want to do is intercept inputs from a particular program or the OS, do some processing, and optionally send those (or different) inputs back. I looked through the API and I can't seem to find anything that would help me achieve this.

@dkrutsko
Copy link
Member

dkrutsko commented Oct 14, 2017

Unfortunately, this is not something that can be handled by robot alone. While you may get the current input state, there's no way to intercept it. If you're using Windows, it should be possible to intercept input with SetWindowsHookEx and WH_KEYBOARD_LL. But I'm not sure it's possible to send different inputs back. I'm thinking you can intercept it, and synthesize a new input. Or better yet, detect if a key is pressed and synthesize a new input in return. That, robot will be able to do.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

No branches or pull requests

2 participants