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:
Numpad0 & Numpad1::MsgBox You pressed Numpad1 while holding down Numpad0.
Numpad0 & Numpad2::Run Notepad
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:
Numpad0::WinMaximize A ; Maximize the active/foreground window.
Numpad0::Send {Numpad0} ; Make the release of Numpad0 produce a Numpad0 keystroke. See comment below.
The presence of one of the above 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.
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:
RControl & RShift::AltTab ; Hold down right-control then press right-shift repeatedly to move forward.
RControl & Enter::ShiftAltTab ; Without even having to release right-control, press Enter to reverse direction.
For more details, see Alt-Tab.
Подписаться на:
Комментарии к сообщению (Atom)
Комментариев нет:
Отправить комментарий