Report problems with documented functionality
- Posts: 50
- Joined: 28 May 2014, 20:03
- Location: Germany
The following script behaves inconsistently.
Code: Select all
Input, UserInput, T1
Keeping Control and g key pressed down produces
. Releasing the keys and keeping them pressed down a second time produces
In the first case it is like the Control key is not put back into down state after sending
with the consequence that the hotkey is not triggered again. I don't know
- Posts: 1218
- Joined: 01 Oct 2013, 08:23
- Location: Netherlands OS: Win7 x64 AHK: Unicode x32
It could be this The hotkey isn't a hooked hotkey. If no hook is installed by other means, it relies on
#HotkeyModifierTimeout after the
Send command, breaking the hotkey until you physically press control again. However, after
Input is issued, the hook is installed so the modifier state is properly tracked. It looks like the hook isn't unloaded afterwards if it keeps working properly.
Try replacing the hotkey with:
$^g:: so it does use the hook and it should work the first time.