Controls which artificial keyboard and mouse events are ignored by hotkeys and hotstrings.
An integer between 0 and 100, which can be an expression.
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.
::btw::can be triggered regardless of #InputLevel by sending
btwat 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.
[v1.1.23+]: 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 command in the auto-execute section.
If SendLevel is used in the auto-execute section, 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