AutoHotkey Homepage AutoHotkey Community
Let's help each other out
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

Disable opening the Start menu

 
Post new topic   Reply to topic    AutoHotkey Community Forum Index -> Ask for Help
View previous topic :: View next topic  
Author Message
zaradek



Joined: 03 Feb 2008
Posts: 36

PostPosted: Tue May 27, 2008 11:12 pm    Post subject: Disable opening the Start menu Reply with quote

How can I disable the opening of the Start menu when the Win key is pressed (and released afterwards)? I have to do it in a way which preserves all the hotkeys which use Win key as a modifyer. (There are ones existing by default and others are made by AutoHotkey.)

Thanks, Máté
Back to top
View user's profile Send private message Send e-mail MSN Messenger
engunneer



Joined: 30 Aug 2005
Posts: 6772
Location: Pacific Northwest, US

PostPosted: Wed May 28, 2008 12:31 am    Post subject: Reply with quote

should be as easy as
Code:

LWin::Return
RWin::Return


no?

untested
_________________
Unless otherwise noted, all code is untested.
Common Answers: 1.(Loops, Viruses, etc.) 2. Search 3.RTFM
Back to top
View user's profile Send private message Visit poster's website
zaradek



Joined: 03 Feb 2008
Posts: 36

PostPosted: Wed May 28, 2008 8:32 am    Post subject: Reply with quote

No, it's not good, because then mappings, such as
Code:
#f::            Run C:\Program Files\Mozilla Firefox\firefox.exe
#WheelDown::   Vol("-","1")

became ineffective.
Back to top
View user's profile Send private message Send e-mail MSN Messenger
Lexikos



Joined: 17 Oct 2006
Posts: 2558
Location: Australia, Qld

PostPosted: Wed May 28, 2008 12:22 pm    Post subject: Reply with quote

Try this:
Code:
*LWin::Send {Blind}{LWin Down}
*LWin Up::Send {Blind}{vk00}{LWin Up}
Sending the null keystroke before LWin UP should prevent the Start menu from displaying. It seems to work on Vista, but not the first time you press LWin. Confused
Back to top
View user's profile Send private message
zaradek



Joined: 03 Feb 2008
Posts: 36

PostPosted: Wed May 28, 2008 2:48 pm    Post subject: Reply with quote

It doesn't work for me on Win XP. It doesn't have effect. If I change vk00 to something else, it can stop opening the Start menu, but it ruins the other hotkeys. If you said something about what key is {vk00} and why do you use it and {Blind} at those places where you do, maybe I could make my working version.

Thanks, Máté
Back to top
View user's profile Send private message Send e-mail MSN Messenger
Lexikos



Joined: 17 Oct 2006
Posts: 2558
Location: Australia, Qld

PostPosted: Wed May 28, 2008 10:08 pm    Post subject: Reply with quote

vk00 is not normally used to represent a key, so sending it should only affect applications that indiscriminately check for any key. {Blind} tells it to send the keystrokes without automatically "releasing" the other modifier keys.

I just tested on XP, and it worked exactly as it did on Vista...
Back to top
View user's profile Send private message
interiot



Joined: 06 Nov 2005
Posts: 64

PostPosted: Thu May 29, 2008 12:23 am    Post subject: Reply with quote

You can still open the start menu with Ctrl-Esc. Or by clicking in the system tray, presing shift-tab several times, then enter.

Probably better to find one of the gpedit.msc settings that will do it (though I didn't see one after doing a quick scan), or by detecting when the start menu is opened and killing it.
Back to top
View user's profile Send private message
Krogdor



Joined: 18 Apr 2008
Posts: 908
Location: The Interwebs

PostPosted: Thu May 29, 2008 12:49 am    Post subject: Reply with quote

interiot wrote:
You can still open the start menu with Ctrl-Esc. Or by clicking in the system tray, presing shift-tab several times, then enter.

Probably better to find one of the gpedit.msc settings that will do it (though I didn't see one after doing a quick scan), or by detecting when the start menu is opened and killing it.


He's not trying to stop the start menu from opening all together, just preventing it from doing so when the Windows key is pressed...

Also, @ Lexikos's script:
Works fine for me, except, as you said, the first time it is pressed after starting the script. Seems strange that it won't work for you, zaradek..
Back to top
View user's profile Send private message AIM Address
interiot



Joined: 06 Nov 2005
Posts: 64

PostPosted: Thu May 29, 2008 12:54 am    Post subject: Reply with quote

HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Policies\Explorer\NoWinKeys then? That does stop things like Win+R, Win+E too, but allows Win-key-based hotkeys to work.
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic    AutoHotkey Community Forum Index -> Ask for Help All times are GMT
Page 1 of 1

 
Jump to:  
You can post new topics in this forum
You can reply to topics in this forum


Powered by phpBB © 2001, 2005 phpBB Group