Controls which artificial keyboard and mouse events are ignored by hotkeys and hotstrings.
SendLevel Level
Type: Integer
An integer between 0 and 100.
Type: Integer
This function returns the previous setting; an integer between 0 and 100.
If SendLevel is not used, the default level is 0.
By default, hook hotkeys and hotstrings ignore keyboard and mouse events generated by any AutoHotkey script. In some cases it can be useful to override this behaviour; for instance, to allow a remapped key to be used to trigger other hotkeys. SendLevel and #InputLevel provide the means to achieve this.
SendLevel sets the level for events generated by the current script thread, while #InputLevel sets the level for any hotkeys or hotstrings beneath it. For any event generated by a script to trigger a hook hotkey or hotstring, the send level of the event must be higher than the input level of the hotkey or hotstring.
Compatibility:
::btw::
can be triggered regardless of #InputLevel by sending btw
at level 1 or higher and physically typing an ending character. This is because hotstring recognition works by collecting input from all levels except level 0 into a single global buffer.The built-in variable A_SendLevel contains the current setting.
Every newly launched hotkey or hotstring thread starts off with a send level equal to the input level of the hotkey or hotstring. Every other newly launched thread (such as a custom menu item or timed subroutine) starts off fresh with the default setting, which is typically 0 but may be changed by using this function during script startup.
If SendLevel is used during script startup, it also affects keyboard and mouse remapping.
AutoHotkey versions older than v1.1.06 behave as though #InputLevel 0
and SendLevel 0
are in effect.
#InputLevel, Send, Click, MouseClick, MouseClickDrag