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

OMG .. can some of this code be repurposed for virtual keyboard? #3

Closed
cgmckeever opened this issue Jan 1, 2020 · 5 comments
Closed

Comments

@cgmckeever
Copy link

HI! -- Im trying to create virtual keystrokes via a script. Im at a loss -- is there any code that you've pieced together that I may be able to leverage? Im trying not to have a physical or your app-bluetooth keyboard. Just some scripts that mock keypresses. Any thoughts would be extremely awesome!

@cgmckeever
Copy link
Author

I see you are using uinput -- which is what Ive been wrestling with, but not able to have it register in an emulator

@threebrooks
Copy link
Owner

Hi cgmckeever,

that part is super easy actually. I am using the "uinput" Python module:

https://pypi.org/project/python-uinput/

to generate the keypresses on the Pi side.

@threebrooks
Copy link
Owner

Make sure the uinput kernel module is loaded also. For initial debugging purposes I also suggest trying to first inject keyboard events into the normal Linux CLI. When that works you can move on to the Emulator.

@cgmckeever
Copy link
Author

cgmckeever commented Jan 1, 2020

Thanks .. I can get it to appear in the F4 console while sending it from a SSH session. Just nothing seems to catch in an emulator.

Also, keystrokes are caught in emulation station itself

@cgmckeever
Copy link
Author

@threebrooks THANKS .. finally got it. Appears emit_combo as well as some other oddities of timing/etc was not making things happy. But all set now, can exit out of a game from a non-player button combo!!

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