jarmo / RAutomation

RAutomation
MIT License
100 stars 33 forks source link

Press and hold a key. #85

Closed Pareshwardhan closed 10 years ago

Pareshwardhan commented 10 years ago

Hi, Is there any method to press and hold keys (ctrl+shift) ??

jarmo commented 10 years ago

Yes, you can do it like this to press ctrl+shift+a for example:

window.send_keys [:control, :shift, "a"]

You just need to put them into the array. You can mix and match also:

window.text_field.send_keys [:control, "a"], "world!"

This will select all and then type "world".