- Mac Control Alt Delete Function
- Control Alt Delete Command
- Control Alt Delete Functions
- Alternative To Pressing Control Alt Delete
Table of Contents
Pressing and releasing certain keys alone (such as Ctrl, Alt, Shift) does not generate Character data. Modifier: Cell array containing the names of the modifier keys released, such as control, alt, or shift. If no modifier keys are released, the cell array is empty. I know, that it can be done, since on some system, where I connect to, there is this ctrl-alt-del in the top level on the tool bar. StephanK Posts: 15. January 2017 Accepted Answer. Forget this, accidentally found it to be already there as the 'running man' icon.
- Function Hotkeys[v1.1.20+]
Introduction and Simple Examples
Hotkeys are sometimes referred to as shortcut keys because of their ability to easily trigger an action (such as launching a program or keyboard macro). In the following example, the hotkey Win+N is configured to launch Notepad. The pound sign [#] stands for Win, which is known as a modifier key:
In the final line above, return
serves to finish the hotkey. However, if a hotkey needs to execute only a single line, that line can be listed to the right of the double-colon. In other words, the return
is implicit:
To use more than one modifier with a hotkey, list them consecutively (the order does not matter). The following example uses ^!s
to indicate Ctrl+Alt+S:
Hotkey Modifier Symbols
You can use the following modifier symbols to define hotkeys:
Symbol | Description |
---|---|
# | Win (Windows logo key). [v1.0.48.01+]: For Windows Vista and later, hotkeys that include Win (e.g. #a) will wait for Win to be released before sending any text containing an L keystroke. This prevents usages of Send within such a hotkey from locking the PC. This behavior applies to all sending modes except SendPlay (which doesn't need it) and blind mode. [v1.1.29+]:Text mode is also excluded. Note: Pressing a hotkey which includes Win may result in extra simulated keystrokes (Ctrl by default). See #MenuMaskKey. |
! | Alt Note: Pressing a hotkey which includes Alt may result in extra simulated keystrokes (Ctrl by default). See #MenuMaskKey. |
^ | Ctrl |
+ | Shift |
& | An ampersand may be used between any two keys or mouse buttons to combine them into a custom hotkey. See below for details. |
< | Use the left key of the pair. e.g. Alt will trigger it. |
> | Use the right key of the pair. |
<^>! | AltGr (alternate graph, or alternate graphic). Ms paint manual. If your keyboard layout has AltGr instead of a right Alt key, this series of symbols can usually be used to stand for AltGr. For example: Alternatively, to make AltGr itself into a hotkey, use the following hotkey (without any hotkeys like the above present): |
* | Wildcard: Fire the hotkey even if extra modifiers are being held down. This is often used in conjunction with remapping keys or buttons. For example: Wildcard hotkeys always use the keyboard hook, as do any hotkeys eclipsed by a wildcard hotkey. For example, the presence of |
~ | When the hotkey fires, its key's native function will not be blocked (hidden from the system). In both of the below examples, the user's click of the mouse button will be sent to the active window: Unlike the other prefix symbols, the tilde prefix is allowed to be present on some of a hotkey's variants but absent on others. However, if a tilde is applied to the prefix key of any custom combination which has not been turned off or suspended, it affects the behavior of that prefix key for all combinations. Special hotkeys that are substitutes for alt-tab always ignore the tilde prefix. [v1.1.14+]: If the tilde prefix is applied to a custom modifier key (prefix key) which is also used as its own hotkey, that hotkey will fire when the key is pressed instead of being delayed until the key is released. For example, the ~RButton hotkey above is fired as soon as the button is pressed. Prior to [v1.1.14] (or without the tilde prefix), it was fired when the button was released, but only if the RButton & C combination was not activated. If the tilde prefix is applied only to the custom combination and not the non-combination hotkey, the key's native function will still be blocked. For example, in the script below, holding Menu will show the tooltip and will not trigger a context menu: If at least one variant of a keyboard hotkey has the tilde modifier, that hotkey always uses the keyboard hook. |
$ | This is usually only necessary if the script uses the Send command to send the keys that comprise the hotkey itself, which might otherwise cause it to trigger itself. The $ prefix forces the keyboard hook to be used to implement this hotkey, which as a side-effect prevents the Send command from triggering it. The $ prefix is equivalent to having specified The $ prefix has no effect for mouse hotkeys, since they always use the mouse hook. It also has no effect for hotkeys which already require the keyboard hook, including any keyboard hotkeys with the tilde (~) or wildcard (*) modifiers, key-up hotkeys and custom combinations. To determine whether a particular hotkey uses the keyboard hook, use ListHotkeys. [v1.1.06+]:#InputLevel and SendLevel provide additional control over which hotkeys and hotstrings are triggered by the Send command. |
UP | The word UP may follow the name of a hotkey to cause the hotkey to fire upon release of the key rather than when the key is pressed down. The following example remaps the left Win to become the left Ctrl: 'Up' can also be used with normal hotkeys as in this example: Limitations: 1) 'Up' does not work with joystick buttons; and 2) An 'Up' hotkey without a normal/down counterpart hotkey will completely take over that key to prevent it from getting stuck down. One way to prevent this is to add a tilde prefix (e.g. Www roblox develop. 'Up' hotkeys and their key-down counterparts (if any) always use the keyboard hook. On a related note, a technique similar to the above is to make a hotkey into a prefix key. The advantage is that although the hotkey will fire upon release, it will do so only if you did not press any other key while it was held down. For example: |
Note: See the Key List for a complete list of keyboard keys and mouse/joystick buttons.
Multiple hotkeys can be stacked vertically to have them perform the same action. For example:
A key or key-combination can be disabled for the entire system by having it do nothing. The following example disables the right-side Win:
Context-sensitive Hotkeys
The directives #IfWinActive/Exist and #If can be used to make a hotkey perform a different action (or none at all) depending on a specific condition. For example:
Custom Combinations
You can define a custom combination of two keys (except joystick buttons) by using ' & ' between them. In the below example, you would hold down Numpad0 then press the second key to trigger the hotkey:
The prefix key loses its native function: In the above example, Numpad0 becomes a prefix key; but this also causes Numpad0 to lose its original/native function when it is pressed by itself. To avoid this, a script may configure Numpad0 to perform a new action such as one of the following:
Fire on release: The presence of one of the above custom combination hotkeys causes the release of Numpad0 to perform the indicated action, but only if you did not press any other keys while Numpad0 was being held down. [v1.1.14+]: This behaviour can be avoided by applying the tilde prefix to either hotkey.
Modifiers: Unlike a normal hotkey, custom combinations act as though they have the wildcard (*) modifier by default. For example, 1 & 2::
will activate even if Ctrl or Alt is held down when 1 and 2 are pressed, whereas ^1::
would be activated only by Ctrl+1 and not Ctrl+Alt+1.
For standard modifier keys, normal hotkeys typically work as well or better than 'custom' combinations. For example, <+s::
is recommended over LShift & s::
.
Combinations of three or more keys are not supported. Combinations which your keyboard hardware supports can usually be detected by using #If and GetKeyState(), but the results may be inconsistent. For example:
Keyboard hook: Custom combinations involving keyboard keys always use the keyboard hook, as do any hotkeys which use the prefix key as a suffix. For example, a & b::
causes ^a::
to always use the hook.
Other Features
NumLock, CapsLock, and ScrollLock: These keys may be forced to be 'AlwaysOn' or 'AlwaysOff'. For example: SetNumLockState AlwaysOn
.
Overriding Explorer's hotkeys: Windows' built-in hotkeys such as Win+E (#e) and Win+R (#r) can be individually overridden simply by assigning them to an action in the script. See the override page for details.
Substitutes for Alt-Tab: Hotkeys can provide an alternate means of alt-tabbing. For example, the following two hotkeys allow you to alt-tab with your right hand:
For more details, see Alt-Tab.
Mouse Wheel Hotkeys
Hotkeys that fire upon turning the mouse wheel are supported via the key names WheelDown and WheelUp. Here are some examples of mouse wheel hotkeys:
[v1.0.48+]: WheelLeft and WheelRight are also supported, but have no effect on operating systems older than Windows Vista. Some mice have a single wheel which can be scrolled up and down or tilted left and right. Generally in those cases, WheelLeft or WheelRight signals are sent repeatedly while the wheel is held to one side, to simulate continuous scrolling. This typically causes the hotkeys to execute repeatedly.
[v1.0.43.03+]: The built-in variable A_EventInfo contains the amount by which the wheel was turned, which is typically 1. However, A_EventInfo can be greater or less than 1 under the following circumstances:
- If the mouse hardware reports distances of less than one notch, A_EventInfo may contain 0;
- If the wheel is being turned quickly (depending on type of mouse), A_EventInfo may be greater than 1. A hotkey like the following can help analyze your mouse:
~WheelDown::ToolTip %A_EventInfo%
.
Some of the most useful hotkeys for the mouse wheel involve alternate modes of scrolling a window's text. For example, the following pair of hotkeys scrolls horizontally instead of vertically when you turn the wheel while holding down the left Ctrl:
Finally, since mouse wheel hotkeys generate only down-events (never up-events), they cannot be used as key-up hotkeys.
Hotkey Tips and Remarks
Mac Control Alt Delete Function
Each numpad key can be made to launch two different hotkey subroutines depending on the state of NumLock. Alternatively, a numpad key can be made to launch the same subroutine regardless of the state. For example:
Control Alt Delete Command
If the tilde (~) operator is used with a prefix key even once, it changes the behavior of that prefix key for all combinations. For example, in both of the below hotkeys, the active window will receive all right-clicks even though only one of the definitions contains a tilde:
The Suspend command can temporarily disable all hotkeys except for ones you make exempt. For greater selectivity, use #IfWinActive/Exist.
By means of the Hotkey command, hotkeys can be created dynamically while the script is running. The Hotkey command can also modify, disable, or enable the script's existing hotkeys individually.
Joystick hotkeys do not currently support modifier prefixes such as ^ (Ctrl) and # (Win). However, you can use GetKeyState to mimic this effect as shown in the following example:
There may be times when a hotkey should wait for its own modifier keys to be released before continuing. Animal crossing ds release date. Consider the following example:
Pressing Ctrl+Alt+S would cause the system to behave as though you pressed Ctrl+Alt+Del (due to the system's aggressive detection of this hotkey). To work around this, use KeyWait to wait for the keys to be released; for example:
If a hotkey label like #z::
produces an error like 'Invalid Hotkey', your system's keyboard layout/language might not have the specified character ('Z' in this case). Try using a different character that you know exists in your keyboard layout.
A hotkey label can be used as the target of a Gosub or Goto. For example: Gosub ^!s
.
One common use for hotkeys is to start and stop a repeating action, such as a series of keystrokes or mouse clicks. For an example of this, see this FAQ topic.
Finally, each script is quasi multi-threaded, which allows a new hotkey to be launched even when a previous hotkey subroutine is still running. For example, new hotkeys can be launched even while a message box is being displayed by the current hotkey.
Alt-Tab Hotkeys
Alt-Tab hotkeys simplify the mapping of new key combinations to the system's Alt-Tab hotkeys, which are used to invoke a menu for switching tasks (activating windows).
Control Alt Delete Functions
Each Alt-Tab hotkey must be either a single key or a combination of two keys, which is typically achieved via the ampersand symbol (&). In the following example, you would hold down the right Alt and press J or K to navigate the alt-tab menu:
AltTab and ShiftAltTab are two of the special commands that are only recognized when used on the same line as a hotkey. Here is the complete list:
AltTab: If the alt-tab menu is visible, move forward in it. Otherwise, display the menu (only if the hotkey is a combination of two keys; otherwise, it does nothing).
ShiftAltTab: Same as above except move backward in the menu.
AltTabMenu: Show or hide the alt-tab menu.
AltTabAndMenu: If the alt-tab menu is visible, move forward in it. Otherwise, display the menu.
Fire on release: The presence of one of the above custom combination hotkeys causes the release of Numpad0 to perform the indicated action, but only if you did not press any other keys while Numpad0 was being held down. [v1.1.14+]: This behaviour can be avoided by applying the tilde prefix to either hotkey.
Modifiers: Unlike a normal hotkey, custom combinations act as though they have the wildcard (*) modifier by default. For example, 1 & 2::
will activate even if Ctrl or Alt is held down when 1 and 2 are pressed, whereas ^1::
would be activated only by Ctrl+1 and not Ctrl+Alt+1.
For standard modifier keys, normal hotkeys typically work as well or better than 'custom' combinations. For example, <+s::
is recommended over LShift & s::
.
Combinations of three or more keys are not supported. Combinations which your keyboard hardware supports can usually be detected by using #If and GetKeyState(), but the results may be inconsistent. For example:
Keyboard hook: Custom combinations involving keyboard keys always use the keyboard hook, as do any hotkeys which use the prefix key as a suffix. For example, a & b::
causes ^a::
to always use the hook.
Other Features
NumLock, CapsLock, and ScrollLock: These keys may be forced to be 'AlwaysOn' or 'AlwaysOff'. For example: SetNumLockState AlwaysOn
.
Overriding Explorer's hotkeys: Windows' built-in hotkeys such as Win+E (#e) and Win+R (#r) can be individually overridden simply by assigning them to an action in the script. See the override page for details.
Substitutes for Alt-Tab: Hotkeys can provide an alternate means of alt-tabbing. For example, the following two hotkeys allow you to alt-tab with your right hand:
For more details, see Alt-Tab.
Mouse Wheel Hotkeys
Hotkeys that fire upon turning the mouse wheel are supported via the key names WheelDown and WheelUp. Here are some examples of mouse wheel hotkeys:
[v1.0.48+]: WheelLeft and WheelRight are also supported, but have no effect on operating systems older than Windows Vista. Some mice have a single wheel which can be scrolled up and down or tilted left and right. Generally in those cases, WheelLeft or WheelRight signals are sent repeatedly while the wheel is held to one side, to simulate continuous scrolling. This typically causes the hotkeys to execute repeatedly.
[v1.0.43.03+]: The built-in variable A_EventInfo contains the amount by which the wheel was turned, which is typically 1. However, A_EventInfo can be greater or less than 1 under the following circumstances:
- If the mouse hardware reports distances of less than one notch, A_EventInfo may contain 0;
- If the wheel is being turned quickly (depending on type of mouse), A_EventInfo may be greater than 1. A hotkey like the following can help analyze your mouse:
~WheelDown::ToolTip %A_EventInfo%
.
Some of the most useful hotkeys for the mouse wheel involve alternate modes of scrolling a window's text. For example, the following pair of hotkeys scrolls horizontally instead of vertically when you turn the wheel while holding down the left Ctrl:
Finally, since mouse wheel hotkeys generate only down-events (never up-events), they cannot be used as key-up hotkeys.
Hotkey Tips and Remarks
Mac Control Alt Delete Function
Each numpad key can be made to launch two different hotkey subroutines depending on the state of NumLock. Alternatively, a numpad key can be made to launch the same subroutine regardless of the state. For example:
Control Alt Delete Command
If the tilde (~) operator is used with a prefix key even once, it changes the behavior of that prefix key for all combinations. For example, in both of the below hotkeys, the active window will receive all right-clicks even though only one of the definitions contains a tilde:
The Suspend command can temporarily disable all hotkeys except for ones you make exempt. For greater selectivity, use #IfWinActive/Exist.
By means of the Hotkey command, hotkeys can be created dynamically while the script is running. The Hotkey command can also modify, disable, or enable the script's existing hotkeys individually.
Joystick hotkeys do not currently support modifier prefixes such as ^ (Ctrl) and # (Win). However, you can use GetKeyState to mimic this effect as shown in the following example:
There may be times when a hotkey should wait for its own modifier keys to be released before continuing. Animal crossing ds release date. Consider the following example:
Pressing Ctrl+Alt+S would cause the system to behave as though you pressed Ctrl+Alt+Del (due to the system's aggressive detection of this hotkey). To work around this, use KeyWait to wait for the keys to be released; for example:
If a hotkey label like #z::
produces an error like 'Invalid Hotkey', your system's keyboard layout/language might not have the specified character ('Z' in this case). Try using a different character that you know exists in your keyboard layout.
A hotkey label can be used as the target of a Gosub or Goto. For example: Gosub ^!s
.
One common use for hotkeys is to start and stop a repeating action, such as a series of keystrokes or mouse clicks. For an example of this, see this FAQ topic.
Finally, each script is quasi multi-threaded, which allows a new hotkey to be launched even when a previous hotkey subroutine is still running. For example, new hotkeys can be launched even while a message box is being displayed by the current hotkey.
Alt-Tab Hotkeys
Alt-Tab hotkeys simplify the mapping of new key combinations to the system's Alt-Tab hotkeys, which are used to invoke a menu for switching tasks (activating windows).
Control Alt Delete Functions
Each Alt-Tab hotkey must be either a single key or a combination of two keys, which is typically achieved via the ampersand symbol (&). In the following example, you would hold down the right Alt and press J or K to navigate the alt-tab menu:
AltTab and ShiftAltTab are two of the special commands that are only recognized when used on the same line as a hotkey. Here is the complete list:
AltTab: If the alt-tab menu is visible, move forward in it. Otherwise, display the menu (only if the hotkey is a combination of two keys; otherwise, it does nothing).
ShiftAltTab: Same as above except move backward in the menu.
AltTabMenu: Show or hide the alt-tab menu.
AltTabAndMenu: If the alt-tab menu is visible, move forward in it. Otherwise, display the menu.
AltTabMenuDismiss: Close the Alt-tab menu.
To illustrate the above, the mouse wheel can be made into an entire substitute for Alt-tab. With the following hotkeys in effect, clicking the middle button displays the menu and turning the wheel navigates through it:
To cancel the Alt-Tab menu without activating the selected window, press or send Esc. In the following example, you would hold the left Ctrl and press CapsLock to display the menu and advance forward in it. Then you would release the left Ctrl to activate the selected window, or press the mouse wheel to cancel. Define the AltTabWindow window group as shown below before running this example.
If the script sent {Alt Down}
(such as to invoke the Alt-Tab menu), it might also be necessary to send {Alt Up}
as shown in the example further below.
General Remarks
Currently, all special Alt-tab actions must be assigned directly to a hotkey as in the examples above (i.e. they cannot be used as though they were commands). They are not affected by #IfWin or #If.
Custom alt-tab actions can also be created via hotkeys. As the identity of the alt-tab menu differs between OS versions, it may be helpful to use a window group as shown below. For the examples above and below which use ahk_group AltTabWindow
, this window group is expected to be defined in the auto-execute section. Alternatively, ahk_group AltTabWindow
can be replaced with the appropriate ahk_class
for your system.
In the following example, you would press F1 to display the menu and advance forward in it. Then you would press F2 to activate the selected window, or press Esc to cancel:
Function Hotkeys [v1.1.20+]
One or more hotkeys can be assigned a function by simply defining it immediately after the hotkey label as in this example:
[v1.1.28+]: Hotstrings can also be defined this way. Multiple hotkeys or hotstrings can be stacked together to call the same function.
There must only be whitespace, comments or directives between the hotkey/hotstring labels or label and the function. Hotkey/hotstring labels defined this way are not visible to IsLabel(), Gosub or other commands; however, the auto-execute section ends at the first hotkey/hotstring even if it is assigned a function.
The main benefit of using a function is that local variables can be used, which avoids conflicts when two or more hotkeys use the same variable names for different purposes. It also encourages self-documenting hotkeys, like in the code above where the function name describes the hotkey.
Alternative To Pressing Control Alt Delete
The Hotkey command can also be used to assign a function or function object to a hotkey.