AutoHotkey Community

It is currently May 27th, 2012, 9:04 am

All times are UTC [ DST ]




Post new topic Reply to topic  [ 12 posts ] 
Author Message
PostPosted: October 25th, 2011, 4:51 am 
Offline

Joined: April 19th, 2007, 8:05 am
Posts: 48
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:
Code:
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?


Last edited by dvda2k on October 25th, 2011, 6:03 pm, edited 1 time in total.

Report this post
Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: October 25th, 2011, 9:48 am 
Offline

Joined: May 11th, 2011, 11:51 pm
Posts: 31
Try -
Code:
~Alt::Msgbox

Works when I tested it.


Report this post
Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: October 25th, 2011, 10:25 am 
Offline

Joined: April 19th, 2007, 8:05 am
Posts: 48
flipswitch5point wrote:
Try -
Code:
~Alt::Msgbox

Works when I tested it.


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


Last edited by dvda2k on October 25th, 2011, 6:04 pm, edited 1 time in total.

Report this post
Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: October 25th, 2011, 6:02 pm 
Offline

Joined: April 19th, 2007, 8:05 am
Posts: 48
Still need help.

Did some further test:
Code:
~Alt::Tooltip, Test Text

Under IE, the menu bar appears again!


Report this post
Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: October 26th, 2011, 12:00 am 
Offline

Joined: May 11th, 2011, 11:51 pm
Posts: 31
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.autohotkey.com/docs/commands/RegWrite.htm

And check out step 3 on the following page:
http://www.sevenforums.com/tutorials/517-menu-bar-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)


Report this post
Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: October 26th, 2011, 12:35 am 
Offline

Joined: May 11th, 2011, 11:51 pm
Posts: 31
Seems the only reason the
Code:
~Alt::msgbox

worked in the first place is because of the msgbox :/
This
Code:
~Alt::
{
Sleep 500
msgbox
}

shows that

Still playing around with it.


Report this post
Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: October 26th, 2011, 12:53 am 
Offline

Joined: May 11th, 2011, 11:51 pm
Posts: 31
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.


Report this post
Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: October 26th, 2011, 1:00 am 
Offline

Joined: May 11th, 2011, 11:51 pm
Posts: 31
Even disabling Alt doesn't seem to work in Internet Explorer

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

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


And only
Code:
LAlt::return
RAlt::return

seem to disable it properly in other programs


Report this post
Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: October 26th, 2011, 4:29 am 
Offline

Joined: October 17th, 2006, 4:15 pm
Posts: 7503
Location: Australia
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::.


Report this post
Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: October 26th, 2011, 1:01 pm 
Offline

Joined: May 11th, 2011, 11:51 pm
Posts: 31
Didn't know about #MenuMaskKey
Seems to work excellently.


Report this post
Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: October 27th, 2011, 7:27 am 
Offline

Joined: April 19th, 2007, 8:05 am
Posts: 48
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?


Report this post
Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: October 27th, 2011, 8:25 am 
Offline

Joined: October 17th, 2006, 4:15 pm
Posts: 7503
Location: Australia
I am unable to reproduce any problems with LAlt::Return. It works as expected here.


Report this post
Top
 Profile  
Reply with quote  
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 12 posts ] 

All times are UTC [ DST ]


Who is online

Users browsing this forum: BrandonHotkey, hyper_, iBob35555VR, tomoe_uehara and 70 guests


You can post new topics in this forum
You can reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Powered by phpBB® Forum Software © phpBB Group