Jump to content

Sky Slate Blueberry Blackcurrant Watermelon Strawberry Orange Banana Apple Emerald Chocolate
Photo

Tricky behavior of alt key under Internet Explorer


  • Please log in to reply
11 replies to this topic
dvda2k
  • Members
  • 48 posts
  • Last active: Mar 12 2012 09:41 AM
  • Joined: 19 Apr 2007
The alt key is a very tricky one under IE. It was designed to show the IE menu bar when when pressed.

I tried to remap it to:
Alt::MsgBox
The message box did show up but you can see that the menu bar also flickered (shows, then hides when focus shifted to MsgBox window). Looks like autohotkey intercepted the alt key, poped up the box, and unexpectedly passed the event to IE.

What should I do to completely remap it under IE without flicker of menu bar?

flipswitch5point
  • Members
  • 31 posts
  • Last active: Jan 13 2012 07:08 PM
  • Joined: 11 May 2011
Try -
~Alt::Msgbox
Works when I tested it.

dvda2k
  • Members
  • 48 posts
  • Last active: Mar 12 2012 09:41 AM
  • Joined: 19 Apr 2007

Try -

~Alt::Msgbox
Works when I tested it.


Thanks, works like a charm!
(Edit: seems it doesn't solve the problem, see below)

dvda2k
  • Members
  • 48 posts
  • Last active: Mar 12 2012 09:41 AM
  • Joined: 19 Apr 2007
Still need help.

Did some further test:
~Alt::Tooltip, Test Text
Under IE, the menu bar appears again!

flipswitch5point
  • Members
  • 31 posts
  • Last active: Jan 13 2012 07:08 PM
  • Joined: 11 May 2011
You can try using RegWrite to "permanently" disable the menu bar. I'd try it, but I'm at work and I apparently don't have permission to modify Microsoft registry keys :/

Syntax for Regwrite: http://www.autohotke...ds/RegWrite.htm

And check out step 3 on the following page:
http://www.sevenforu...r-turn-off.html

Download the files and open them with notepad to find out what parameters to pass to RegWrite.

(You may also need to use RegDelete, I'm not sure if RegWrite will overwrite data in keys)

flipswitch5point
  • Members
  • 31 posts
  • Last active: Jan 13 2012 07:08 PM
  • Joined: 11 May 2011
Seems the only reason the
~Alt::msgbox
worked in the first place is because of the msgbox :/
This
~Alt::
{
Sleep 500
msgbox
}
shows that

Still playing around with it.

flipswitch5point
  • Members
  • 31 posts
  • Last active: Jan 13 2012 07:08 PM
  • Joined: 11 May 2011
I have no idea why Alt would behave like this... No other keys seem to behave like this, but I could be wrong. Will let you know if I figure something out though, but it seems unlikely.

flipswitch5point
  • Members
  • 31 posts
  • Last active: Jan 13 2012 07:08 PM
  • Joined: 11 May 2011
Even disabling Alt doesn't seem to work in Internet Explorer

That is to say none of the following seem to work:

Alt::return
RAlt::return
LAlt::return
~Alt::return
~RAlt::return
~LAlt::return

And only
LAlt::return
RAlt::return
seem to disable it properly in other programs

Lexikos
  • Administrators
  • 9844 posts
  • AutoHotkey Foundation
  • Last active:
  • Joined: 17 Oct 2006
When you use Alt, Ctrl or Shift as a hotkey, it fires on release of the key, and only if no other key was pressed. This allows key combinations such as Alt+F to continue working. Instead of blocking the Alt keystroke, AutoHotkey prevents the menu from popping up by injecting a Ctrl keystroke (or some other key) when the Alt key is being released. However, LAlt and RAlt hotkeys do not have this behaviour unless you also have an Alt hotkey.

So basically, use LAlt:: and RAlt:: but not Alt::.

flipswitch5point
  • Members
  • 31 posts
  • Last active: Jan 13 2012 07:08 PM
  • Joined: 11 May 2011
Didn't know about #MenuMaskKey
Seems to work excellently.

dvda2k
  • Members
  • 48 posts
  • Last active: Mar 12 2012 09:41 AM
  • Joined: 19 Apr 2007
tried Lexikos's suggestion. but the behaviors is still very strange.

LAlt::Return
RAlt::Return

works. but if only one alt is remaped, strange things happen:

LAlt::Return

press left alt, no menu bar,good;
then press right alt, menu bar shows up, suppose to be;
press left alt again, menu bar shows up!

any analysis?

Lexikos
  • Administrators
  • 9844 posts
  • AutoHotkey Foundation
  • Last active:
  • Joined: 17 Oct 2006
I am unable to reproduce any problems with LAlt::Return. It works as expected here.