| View previous topic :: View next topic |
| Author |
Message |
zaradek
Joined: 03 Feb 2008 Posts: 36
|
Posted: Tue May 27, 2008 11:12 pm Post subject: Disable opening the Start menu |
|
|
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 |
|
 |
engunneer
Joined: 30 Aug 2005 Posts: 6772 Location: Pacific Northwest, US
|
Posted: Wed May 28, 2008 12:31 am Post subject: |
|
|
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 |
|
 |
zaradek
Joined: 03 Feb 2008 Posts: 36
|
Posted: Wed May 28, 2008 8:32 am Post subject: |
|
|
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 |
|
 |
Lexikos
Joined: 17 Oct 2006 Posts: 2558 Location: Australia, Qld
|
Posted: Wed May 28, 2008 12:22 pm Post subject: |
|
|
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.  |
|
| Back to top |
|
 |
zaradek
Joined: 03 Feb 2008 Posts: 36
|
Posted: Wed May 28, 2008 2:48 pm Post subject: |
|
|
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 |
|
 |
Lexikos
Joined: 17 Oct 2006 Posts: 2558 Location: Australia, Qld
|
Posted: Wed May 28, 2008 10:08 pm Post subject: |
|
|
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 |
|
 |
interiot
Joined: 06 Nov 2005 Posts: 64
|
Posted: Thu May 29, 2008 12:23 am Post subject: |
|
|
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 |
|
 |
Krogdor
Joined: 18 Apr 2008 Posts: 908 Location: The Interwebs
|
Posted: Thu May 29, 2008 12:49 am Post subject: |
|
|
| 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 |
|
 |
interiot
Joined: 06 Nov 2005 Posts: 64
|
|
| Back to top |
|
 |
|