Cannot detect one of my Home keys

Get help with using AutoHotkey and its commands and hotkeys
hforest9
Posts: 1
Joined: 09 Aug 2020, 02:44

Cannot detect one of my Home keys

09 Aug 2020, 02:56

Hi there

I am developing a script to disable Alt+Home in IE and Chrome. Below is extract of script.
I can detect other keys such as Alt+X (if I substitute !Home in below code to !X then it can detect Alt+X) but not able to detect Alt-Home.
Is there anything I missed or I need to use other methods to detect Alt+Home?

Code: Select all

$!Home::
if WinActive("ahk_class IEFrame")
{
	MsgBox "IE Alt+Home"
	return
}
else if WinActive("ahk_class Chrome_WidgetWin_1")
{
	MsgBox "Chrome Alt+Home"
	return
}
Send ^!Home
[Mod edit: [code][/code] tags added.]

Hforest
Rohwedder
Posts: 3377
Joined: 04 Jun 2014, 08:33
Location: Germany

Re: Cannot detect one of my Home keys

09 Aug 2020, 03:47

Hallo,
replace Send ^!Home by Send ^!{Home}
or perhaps:

Code: Select all

#If WinActive("ahk_class IEFrame") Or WinActive("ahk_class Chrome_WidgetWin_1")
!Home::Return ;disable Alt+Home in IE and Chrome
#If

Return to “Ask For Help”

Who is online

Users browsing this forum: f1ster, TAC109 and 28 guests