Page 1 of 1

Ctrl + Left Click

Posted: Fri Feb 13, 2009 7:23 pm
by atom
Hiya

There is a Button that i need to click on while holding down the Left Ctrl key
Is that possible in Ranorex, seems you can only click with a specific mouse button, but no while a key is being pressed.

Thanks

Posted: Mon Feb 16, 2009 9:52 am
by Support Team
There is no method in the Adapter (since keyboard input is always global and not specific to an element), but there are methods in the Keyboard class which provide that functionality: the Keyboard.Down and Keyboard.Up methods.

Code: Select all

Keyboard.Down(System.Windows.Forms.Keys.ControlKey);
button.Click();
Keyboard.Up(System.Windows.Forms.Keys.ControlKey);
Regards,
Alex
Ranorex Support Team