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

press_key not repeating keys #14

Open
Fuzzyma opened this issue Oct 8, 2016 · 3 comments
Open

press_key not repeating keys #14

Fuzzyma opened this issue Oct 8, 2016 · 3 comments

Comments

@Fuzzyma
Copy link

Fuzzyma commented Oct 8, 2016

I dont know if this is an issue with this awesome library or with my os (windows btw).
When I do a press_key in python, I assumed, that this key gets repeated until I release it (like when you press a char on your keyboard and your texteditor goes aaaaaaaaaaaaaa).
However: Its not like that. The key gets pressed once and never again.
Any ideas?

@pepijndevos
Copy link

I'm not sure of the top of my head what the expected behaviour is: At what level in the stack keys get repeated.

I'm also not sure why you'd want to do aaaaaaaaaaaa. If you want to create a specific number of a's, there is tap_key, which takes it as an argument. If you want to control a game, it'll probably work as-is, unless the game is using directinput as discussed in #2.

@Fuzzyma
Copy link
Author

Fuzzyma commented Oct 8, 2016

All in all, I want to simulate a keyboard when I use PyKeyboard. And when you hold down a key on a keyboard (which is a keypress) the charackter gets repeated. I know about the repeat parameter but its not useful in my case. I dont want a certain number of repeats but repeating until the key is released.
I am curious where this key repeating logic is actually located. It looks like the os doesnt do it on their own...

@j7168908jx
Copy link

I'm now in the same situation as #1. As I'm running some scripts on other apps, for example, a driving game, I want to simulate that the 'Up' key is pressed, while PyKeyboard 'press_key' only makes it look like tapping the key...

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

3 participants