set input delay...
Checked the documentation
- [X] I have checked the documentation for the feature I am requesting
describe your feature request
Hi, it is completely unclear whether or not you can setup input delay. Right now it types a text message in mere milliseconds, but i want to put a key delay after each stroke for 10ms. This isn't supported right now it seems, while it's a basic feature in AHK.
Have you tried using the key_delay parameter?
where? Key_delay exists for just typing, but not sending messages TO a window.
That's true. There is an oversight in the API for Window.send and this parameter isn't there. Though, you did not mention your use case is for sending to a window until just now :)
I should be able to add this feature quickly, both for a key_delay parameter in Window.send and also a global set_key_delay perhaps.
In the meantime, a workaround may be to control the delays 'manually':
delay = 0.1
for key in 'my message':
win.send(key)
time.sleep(delay)
This is great! By the way, is this send basically ControlSend? Would it cause the same issues as win,shift,alt,ctrl keys being stuck?
Right. The underlying functionality of Window.send uses AutoHotkey's ControlSend, so the behavior you observe will be identical to that of ControlSend in AutoHotkey scripts.