lhuang5
11 years agoOccasional Contributor
How to simulate Left Ctrl key pressed?
Hello,
We need to keep Ctrl and Left-Ctrl key pressed in our application in order to open two dialogs which are using different technology.
Use this way for Ctrl key pressed
Sys.Desktop.KeyDown(VK_CONTROL); // Press Ctrl
//Open operation.
Sys.Desktop.KeyUp(VK_CONTROL); // Release Ctrl
Our engineers are using [X163] as Left-Ctrl key's virtual-key code. This virtual-ley code seems not to be supported in TestComplete.
Wonder whether this is the correct way using KeyDown and KeyUp. And how can we simulate the Left-Ctrl key pressed.
Thanks
Liping
We need to keep Ctrl and Left-Ctrl key pressed in our application in order to open two dialogs which are using different technology.
Use this way for Ctrl key pressed
Sys.Desktop.KeyDown(VK_CONTROL); // Press Ctrl
//Open operation.
Sys.Desktop.KeyUp(VK_CONTROL); // Release Ctrl
Our engineers are using [X163] as Left-Ctrl key's virtual-key code. This virtual-ley code seems not to be supported in TestComplete.
Wonder whether this is the correct way using KeyDown and KeyUp. And how can we simulate the Left-Ctrl key pressed.
Thanks
Liping
- Hi Liping,
I believe that LLPlayer object (see TC help) with Win32API.VK_LCONTROL and Win32API.VK_RCONTROL constants should work for you.