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

Add more functions by default to Ion in Python #354

Open
PetitFrapo opened this issue Dec 19, 2023 · 0 comments
Open

Add more functions by default to Ion in Python #354

PetitFrapo opened this issue Dec 19, 2023 · 0 comments

Comments

@PetitFrapo
Copy link

Is your feature request related to a problem? Please describe.
Each time I use Ion to make Python programs I always stumble into the issue of half presses or waiting for full press, so I find myself needing to program key_pressed() and key_half_pressed() functions, and I think they should be implemented, because a simple keydown doesn't cut it for some situations, makes UIs way too sensitive.

Describe the solution you'd like
Implement in Ion by default the key_pressed(k) and key_half_pressed(k) functions. The former immediately returns False if the key is not down and if the key is down, it waits until it's unheld to return True. The latter is a bit harder to implement, but the idea is that once the key is pressed it returns True but it shouldn't return True again as long as the key is still held, which prevents actions on the same key to happen each frame, but while not needing to wait to un-hold it.
(I also think that get_keys() should not return strings of the keys themselves, but more like "KEY_EXP", "KEY_EXE", etc...)
If you have any further questions about the functions I mentioned, feel free to ask for clarification.

@PetitFrapo PetitFrapo changed the title Add more features to Ion Add more functions by default to Ion in Python Dec 19, 2023
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

1 participant