Link to home
Start Free TrialLog in
Avatar of beatified
beatifiedFlag for United States of America

asked on

AutoHotKey intercepting F12 Key

I have a program that uses F12 and it seems when I have a AHK Script waiting in the background it seems to intercept the F12 Key before the program can get it.

Is there a way to disable the F12 Key from being intercepted by AHK.
Avatar of Joe Winograd
Joe Winograd
Flag of United States of America image

Hi Stuart,
Sure, no problem doing that. Post the AutoHotkey script and I'll disable F12 for you. Or just look for this in the script:

F12::
----- other AHK code is here
Return

Open in new window

Change it to this:
/*
F12::
----- other AHK code is here
Return
*/

Open in new window

That comments out the F12 key...AutoHotkey will no longer intercept it. But whatever AutoHotkey is doing with F12 now...would you like to still have that functionality available via some other hotkey...maybe Alt+F12 or Ctrl+F12 or Alt+Ctrl+F12 or something else? If so, you could do this, for example:

!^F12:: ; hotkey is now Alt+Ctrl+F12
----- other AHK code is here
Return

Open in new window

Regards, Joe
Avatar of beatified

ASKER

Thanks for the reply Joe,
I don't use F12 as a hotkey for the script nor is it referenced in the script. It is just being intercepted and not allowing the F12 Key to function in the program I am using at the time. So I'm not sure that the above solution takes this into account maybe it does I don't know.

Let me know what you think.
Stuart
I've never seen AutoHotkey intercept keystrokes that aren't specified in a running script. You say, "...it seems to intercept the F12 Key before the program can get it." I doubt that...what makes you think so?
Well when I have the scripts waiting in the background the F12 Key doesn't work but when I exit the scripts so they are not waiting for their hot keys the F12 works again.
> scripts waiting in the background

I presume you mean that the AutoHotkey scripts are running. With the plural on scriptS, it sounds as if there are several...did you check them all for an F12 hotkey?

Try this...exit all the scripts...put this command as the first line in each one:

ListHotkeys

Run all the scripts...look at the ListHotkeys output...do you see F12 in there?
I think i narrowed down the problem. It seems to be an issue with Pulover's Macro Creator. I really just need to leard AHK directly I think I will save myself a lot of grief in the long run.

I converted the PMC files to AHK and it seems to no longer be an issue.
ASKER CERTIFIED SOLUTION
Avatar of Joe Winograd
Joe Winograd
Flag of United States of America image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Hi Stuart,
I'm trying to clean up open questions at EE...this is one of them. Do you need more help with it? Regards, Joe