Controls which artificial keyboard and mouse events are ignored by hotkeys and hotstrings.

#InputLevel Level



Type: Integer

An integer between 0 and 100. If omitted, it defaults to 0.

General Remarks

For an explanation of how SendLevel and #InputLevel are used, see SendLevel.

This directive is positional: it affects all hotkeys and hotstrings between it and the next #InputLevel directive. If not specified by an #InputLevel directive, hotkeys and hotstrings default to level 0.

A hotkey's input level can also be set using the Hotkey function. For example: Hotkey "#z", my_hotkey_sub, "I1"

The input level of a hotkey or non-auto-replace hotstring is also used as the default send level for any keystrokes or button clicks generated by that hotkey or hotstring. Since a keyboard or mouse remapping is actually a pair of hotkeys, this allows #InputLevel to be used to allow remappings to trigger other hotkeys.

AutoHotkey versions older than v1.1.06 behave as though #InputLevel 0 and SendLevel 0 are in effect.

Like other directives, #InputLevel cannot be executed conditionally.

SendLevel, Hotkeys, Hotstrings


Causes the first hotkey Numpad0:: to trigger the second hotkey ~LButton::. This would be not the case if the #InputLevel directives are omitted or commented out.

#InputLevel 1
#InputLevel 0
; This hotkey can be triggered by both Numpad0 and LButton:
~LButton::MsgBox "Clicked"