-
Notifications
You must be signed in to change notification settings - Fork 24
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
keyboard not working in games #62
Comments
What game is this? Does it work with the Java Robot class in this game? |
League of Legends, running in borderless mode. Yes it does work with Java Robot, which is really surprising to me. Also surprising that, when opening chat, the key will get dispatched to the ingame-chat correctly. It's just not working for invoking ingame commands. (Also clicking with the mouse works perfectly fine) |
Interesting, the keypress logic is the same as Java, so you can almost rule out in-game protections. would something like |
I pretty much copied from the documentation but just in case, I tried the following:
Like I said it's working for the chat but unfortunately that's not really helpful. |
I remember looking at a game a while back where if the window was not in focus, it would ignore all input, this doesn't apply in this case. It also very foolishly ignored injected input which prevented certain hardware from working, so they had to patch it. I wonder if anybody else has ran into this problem, perhaps it has some special logic to ignore |
Well for LoL, when the game is not in focus, even when in the front, it will not accept any keyboard input, not even from the keyboard. But I've made sure it's focused and regular keyboard input, same as the java robot input works. Unfortunately I don't really have a good idea about c++ but if I find the time I'll see if I can compile a small demo to check if it works. Anyway, thanks for your effort. |
Could you please also tell me what OS you're using? |
Sure. Windows 10 Professional and Node 10.6. |
Any news on this? I'm working on a game controller, and planned to use this for programmable macros, but some games ignore the keyboard commands (as above, it works in chat input field). Doesn't work on Guild Wars 2, but does work fine in Rimworld. Using something like Joy2Key (which seems C++ based, but doesn't offer a library) works ok in games. Windows 10, Node 10. |
I had some issues with keypresses too. See my PR here: Robot/robot#116 |
Hey there.
Dispatching keys is not working in games for me.
keyboard.click(robot.KEY_Q);
for example is not doing anything when using it in a game window, it works when trying to dispatch it to a text-field though (even works with the ingame chat of the game).Any suggestion or a fix?
Suprisingly, I've done something similar before with Java's Robot class and it worked just fine.
The text was updated successfully, but these errors were encountered: