press ctrl+a

Ask questions here, report about problems.
Post Reply
Kloorfair
Posts: 2
Joined: Sat Oct 05, 2019 6:17 pm

press ctrl+a

Post by Kloorfair » Tue Oct 15, 2019 10:22 pm

Hello. I need to press in the browser window combination CTRL+A.
do so:

Code: Select all

$keyboard->set_ctrl_prefix(true);
$keyboard->press_key_by_code(65);
$keyboard->set_ctrl_prefix(false);
But nothing happens, how can I press these buttons in Studio?

User avatar
support
Site Admin
Posts: 68
Joined: Fri Feb 22, 2019 3:42 pm

Re: press ctrl+a

Post by support » Tue Oct 15, 2019 11:22 pm

Hello, use keyboard function send_key

Code: Select all

// send_key($key,$is_key=false,$ctrl=false,$alt=false,$shift=false)
$keyboard->send_key(65,false,true);
// or
$keyboard->send_key('A',true,true);

Kloorfair
Posts: 2
Joined: Sat Oct 05, 2019 6:17 pm

Re: press ctrl+a

Post by Kloorfair » Wed Oct 16, 2019 12:02 am

Thanks. It works.

Post Reply