-
Notifications
You must be signed in to change notification settings - Fork 59
Allow inserting keystrokes #33
Copy link
Copy link
Open
Description
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?
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels