-
Notifications
You must be signed in to change notification settings - Fork 459
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
Allow receiving real-time keyboard events from Python #925
Comments
The naming issue here is probably deeper than expected. Regarding the keyboard API, I don't think there are any standard Python APIs that can be piggybacked on (unless we do things like Assuming we want a keyboard API suitable for beginners, we could return a set of strings representing currently-pressed keys (such as |
See #1201 |
In #1201, I made several choices:
|
Maybe one could be inspired by the button objects in Microbit: |
This has been fixed by #1201 |
Are there any plans for a similar blocking
|
A polling loop (as you mentioned) is exactly what we do with the ion module! |
Problem you'd like to fix
It's currently not possible to code an arcade-style game in Python because there's no way to get real-time keyboard state (the
input
function is blocking).Describe the solution you'd like
Expose
Ion::Keyboard::scan
in Python. The code itself should be rather simple to write, but what's interesting is the API. What should we call the module? Is there any standard Python function we could piggyback on?The text was updated successfully, but these errors were encountered: