#3712 closed Bug (No Bug)
HotKeySet not sets Alt+F4 in Windows 10
| Reported by: | NSUSpray | Owned by: | |
|---|---|---|---|
| Milestone: | Component: | AutoIt | |
| Version: | 3.3.14.5 | Severity: | None |
| Keywords: | Cc: | nsu.spray@… |
Description
When I run this script and press Alt+F4, the current active window closes, as if the script was not running at all.
func foo ()
MsgBox (4096, "", "Alt+F4 is pressed")
endfunc
HotKeySet ("!{F4}", "foo")
while True
Sleep (1000)
wend
This issue has been discussed two years ago:
https://www.autoitscript.com/forum/topic/189515-windows-10-intercept-altf4/
Attachments (0)
Change History (3)
comment:1 by , 7 years ago
| Resolution: | → No Bug |
|---|---|
| Status: | new → closed |
comment:2 by , 7 years ago
By no means! In the topic to which I gave the link, noticed:
AutoHotKey work without any problem under Windows 10
https://www.autoitscript.com/forum/topic/189515-windows-10-intercept-altf4/?do=findComment&comment=1360776
I also checked with AutoHotkey and I have the same positive result.
comment:3 by , 7 years ago
The fact that AHK honours the combination means nothing - if they wish to mess with Windows reserved keys than that is their problem, not ours.
M23

It appears that that key combination is reserved in Windows 10, you can use it with another modifier key such as control or shift, but not by itself.
Use something else.