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

Allow inserting keystrokes #33

Open
gkdada opened this issue Dec 20, 2022 · 0 comments
Open

Allow inserting keystrokes #33

gkdada opened this issue Dec 20, 2022 · 0 comments

Comments

@gkdada
Copy link

gkdada commented Dec 20, 2022

Can you allow inserting keystrokes (so as to release a GetKey() call)?

The scenario is like this: The main routine issues a GetKey() call and is waiting for input. A goroutine meanwhile is counting on a timer and wants to end the wait when the timout occurs. At this point, how do I 'cancel' the GetKey() call? The solution I found (and it works fine) is to have a PushKey(ev KeyEvent) method added to keyboard_common.go that only does inputComm <- ev. This will push a default keystroke in and completes the GetKey() which can then return.

Did you leave out this functionality because of the security implications? If so, what is the alternative solution to cancel a GetKey() blocking call?

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