How to simulate real keys?

Get help with using AutoHotkey (v1.1 and older) and its commands and hotkeys
crocodile
Posts: 98
Joined: 28 Dec 2020, 13:41

How to simulate real keys?

Post by crocodile » 26 May 2022, 11:30

AutoControl is a chrome hotkey extension. In this extension, I set "F11" to close the left tab. When I send F11 manually, it works fine. But when I send it using AutoHotkey, it triggers the browser to go full screen.
I have tried all possibilities including (Send, ControlSend, SendInput, SendPlay, SendEvent) and they all trigger the full screen, not AutoControl.
Then when I press F11 at the keyboard, AutoControl receives it normally.
How can I get AutoControl to pick up the hotkeys?

User avatar
mikeyww
Posts: 26931
Joined: 09 Sep 2014, 18:38

Re: How to simulate real keys?

Post by mikeyww » 26 May 2022, 11:46

I did not try this, but since you now have three different programs or scripts that use the same hotkey, I'm not sure that you will be able to control which has priority, or what happens. This does sometimes work in other target programs, but I don't think that you can guarantee it. You could try a different hotkey, or eliminate one of the two scripting programs.

crocodile
Posts: 98
Joined: 28 Dec 2020, 13:41

Re: How to simulate real keys?

Post by crocodile » 26 May 2022, 11:49

mikeyww wrote:
26 May 2022, 11:46
I did not try this, but since you now have three different programs or scripts that use the same hotkey, I'm not sure that you will be able to control which has priority, or what happens. This does sometimes work in other target programs, but I don't think that you can guarantee it. You could try a different hotkey.
Yes, I have tried a large number of other hotkeys, both complex and simple. They all have the same problem. f11 is the most obvious of them.

Rohwedder
Posts: 7644
Joined: 04 Jun 2014, 08:33
Location: Germany

Re: How to simulate real keys?

Post by Rohwedder » 26 May 2022, 12:02

Hallo,
How to simulate real keys?
Try something simpler:
How to simulate real money?

Post Reply

Return to “Ask for Help (v1)”