Add an API for
sendKeyStrokes that accepts a collection of keystrokes and executes each individual
sendKeyStroke in order.
Impact for my app: [low, mid, high, show-stopper].
Low. We can work around the issue for now.
What is your current pain point?
sendKeyStroke sends the key stroke asynchronously and does not buffer the calls to ensure that the previous request succeeds before the next request. This makes it possible for consecutive calls to
sendKeyStroke to potentially submit the key strokes out of order.
In our app, we use
sendKeyStroke to auto-fill a text field for the user with a server name/password. To do this, we make a series of consecutive calls to
sendKeyStroke to create the complete string:
(sendKeyStroke "A") (sendKeyStroke "B") (sendKeyStroke "C") ...
For now, we attempt to work around the issue by adding a fixed delay before each call to
sendKeyStroke. But this is not guaranteed to be correct and causes an unnecessary delay in our code.
What do you have in mind to solve it?
sendKeyStrokes that accepts a collection of characters allows us to tell OW exactly what we want to submit, and OW can ensure that each key stroke is submitted in order:
(sendKeyStrokes ["A", "B", "C", "D3"])
Note that the new API cannot simply take a string, as some of the Microsoft Key Enum values are multiple characters.