How to prevent !4::F4 from sending Alt+F4 Topic is solved

Get help with using AutoHotkey (v1.1 and older) and its commands and hotkeys
User avatar
geekyadam
Posts: 45
Joined: 01 Aug 2016, 17:11

How to prevent !4::F4 from sending Alt+F4

15 Mar 2022, 14:05

I have a program that uses F4 for a specific action. I want Alt+4 to send F4:

Code: Select all

!4::F4
The F4 key is sent to the active window successfully, but since Alt is the modifier to trigger the hotkey, AHK inherently sends Alt+F4 to the operating system at the same time, closing my active window. I don't want that to happen.

Is there any way to use the Alt modifier with a hotkey to send F4 without triggering Alt+F4 in the operating system? I searched the forums and community pages but can't find any info on that.
User avatar
geekyadam
Posts: 45
Joined: 01 Aug 2016, 17:11

Re: How to prevent !4::F4 from sending Alt+F4

15 Mar 2022, 14:56

Well crap. No idea why I didn't try that already. Thanks.

Return to “Ask for Help (v1)”

Who is online

Users browsing this forum: big-jg, JnLlnd and 208 guests