Win 이벤트나 Alt 키뗌 이벤트를 마스크하기 위해 사용될 키를 변경합니다.
#MenuMaskKey KeyName
A 키 이름 또는 0 아닌 가상 키코드를 지정하는 VKnn 연속열. Scan codes are used only in [v1.1.28+], which also supports SCnnn and VKnnSCnnn.
The mask key is sent automatically to prevent the Start menu or the active window's menu bar from activating at unexpected times.
The default mask key is Ctrl. This directive can be used to change the mask key to a key with fewer side effects.
Good candidates are virtual key codes which generally have no effect, such as vkE8, which Microsoft documents as "unassigned", or vkFF, which is reserved to mean "no mapping" (a key which has no function).
주의: Microsoft can assign an effect to an unassigned key code at any time. For example, vk07 was once undefined and safe to use, but since Windows 10 1909 it is reserved for opening the game bar.
[v1.1.28+]: Both the VK and SC can be specified, and are not required to match an existing key. Specifying vk00sc000
will disable all automatic masking. Some values, such as zero VK with non-zero SC, may fail to suppress the Start menu.
이 설정은 전역적입니다. (스크립트 아무데서나) 한 번만 지정하면 전체 스크립트의 행위에 영향을 줄 수 있다는 뜻입니다.
다른 지시어처럼, #MenuMaskKey는 조건적으로 실행할 수 없습니다.
단축키: 핫키를 키보드 갈고리나 마우스 갈고리를 사용하여 구현했다면, 마지막 키눌림은 활성창과 시스템에 보이지 않을 수도 있습니다. If the system was to detect only a Win or Alt keydown and keyup with no intervening keypress, it would usually activate a menu. To prevent this, the keyboard or mouse hook may automatically send the mask key.
[v1.1.27+]: Pressing a hook hotkey causes the next Alt or Win keyup to be masked if all of the following conditions are met:
$#a::
in combination with AppsKey::RWin
causes masking when Menu+A is pressed, but Menu on its own is able to open the Start Menu.Mouse hotkeys may send the mask key immediately if the keyboard hook is not installed.
Hotkeys with the tilde modifier are not intended to block the native function of the key, so in [v1.1.27+] they do not cause masking. Hotkeys like ~#a::
still suppress the menu, since the system detects that Win has been used in combination with another key. However, mouse hotkeys and both Win themselves (~LWin::
and ~RWin::
) do not suppress the Start Menu.
The Start Menu (or the active window's menu bar) can be suppressed by sending any keystroke. The following example disables the ability for the left Win to activate the Start Menu, while still allowing its use as a modifier:
~LWin::Send {Blind}{vkE8}
Send: Send, ControlSend and related often release modifier keys as part of their normal operation. For example, the hotkey <#a::SendRaw %Address%
usually must release the left Win prior to sending the contents of Address, and press the left Win back down afterward (so that other Win key combinations continue working). The mask key may be sent in such cases to prevent a Win or Alt keyup from activating a menu.
배경 정보는 이 쓰레드를 참조하십시오.
#MenuMaskKey vkE8 ; Change the masking key to something unassigned such as vkE8. #Space::Run % A_ScriptDir ; An additional Ctrl keystroke is not triggered.