Jump to content

Disable Winkey to open Start Menu


Recommended Posts

I have made a script to designate my own hotkeys. However, I have problems with the hotkeys which use a Windows key for the shortcut. Such as using Win+w to send PgUp, which causes the Start Menu to open and looses focus of the active window. or Win+z to send Alt+F4, which causes a {WinDown} effect.

I found a program (WinKey by Copernic) that allows me to disable the use of the Windows key to open the start menu and fix both of the above problems, but that is the only thing I want use it for. Does anyone know how to use Autoit to disble the Windows key in the same or similar way as the WinKey software?

Thanks,

BTH

Link to comment
Share on other sites

... how to use Autoit to disble the Windows key ...

Maybe a RegWrite() to the area of interest:

Either at the machine level for all users:

http://technet.microsoft.com/en-us/library/cc757877.aspx

or at the current user level:

http://www.pctools.com/guides/registry/detail/549/

I've not tested this - I just Goolged "NoWinKeys"

Edited by herewasplato

[size="1"][font="Arial"].[u].[/u][/font][/size]

Link to comment
Share on other sites

I tried the registry change listed in your PCTools link - no effect.

I forgot to mention I have already disabled the default Win+X keys (except U and L) using TweakUI which does the same as the Microsoft link you provided. In addition I used used a Group Policy change and Registry edit to disable Win+U and Win+L, respectively.

I want to disable the Start Menu opening when I press the Windows key.

Thanks,

BTH

P.S. I do appreciate the quick response.

Maybe a RegWrite() to the area of interest:

Either at the machine level for all users:

http://technet.microsoft.com/en-us/library/cc757877.aspx

or at the current user level:

http://www.pctools.com/guides/registry/detail/549/

I've not tested this - I just Goolged "NoWinKeys"

Link to comment
Share on other sites

... I want to disable the Start Menu opening when I press the Windows key. ...

Doh! I missed that point.

Try this:

http://www.windowsnetworking.com/kbase/Win...onkeyboard.html

or this claims to do what the Winkey software does:

http://mihai.bazon.net/blog/disable-win-key-in-windows

I did not test either......

[size="1"][font="Arial"].[u].[/u][/font][/size]

Link to comment
Share on other sites

Neither of these worked the both completely disabled the windows key, so that I can't even use them Autoit's HotKey or isPressed function. If you come up with anything else please let me.

Tonight, I'll try running process monitor to see if I can catch what this WinKey program is doing when it disables the Windows key.

Thanks,

BTH

Doh! I missed that point.

Try this:

http://www.windowsnetworking.com/kbase/Win...onkeyboard.html

or this claims to do what the Winkey software does:

http://mihai.bazon.net/blog/disable-win-key-in-windows

I did not test either......

Link to comment
Share on other sites

Best way to do it is to add a scan code map to the registry

Save this as a ".reg" file, then run it and it will disable windows keys

Left windows Key only:

Windows Registry Editor Version 5.00

[HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Keyboard Layout]
"Scancode Map"=hex:00,00,00,00,00,00,00,00,02,00,00,00,00,00,5B,E0,00,00,00,00

Right Windows Key Only

Windows Registry Editor Version 5.00

[HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Keyboard Layout]
"Scancode Map"=hex:00,00,00,00,00,00,00,00,02,00,00,00,00,00,5C,E0,00,00,00,00

Both:

Windows Registry Editor Version 5.00

[HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Keyboard Layout]
"Scancode Map"=hex:00,00,00,00,00,00,00,00,03,00,00,00,00,00,5B,E0,00,00,5C,E0,00,00,00,00

Edit:

Note: Restart is required for changes to take effect. And this will remove it:

Windows Registry Editor Version 5.00

[HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Keyboard Layout]
"Scancode Map"=0
Edited by Paulie
Link to comment
Share on other sites

Those registry edits completely disabled the windows key, so that I can't even use them Autoit's HotKey or isPressed function. I only want to disable the Start Menu opening when I press the windows key.

I tried monitoring the WinKey program and believe it sets this with its own WinKeyHook.dll. However, I do not know what information / command is being sent to it. Does any one know how to tell what is going on with this dll. I have attached the dll, the entire program can be downloaded from: http://www.brothersoft.com/winkey-11286.html.

Thanks,

BTH

Best way to do it is to add a scan code map to the registry

Save this as a ".reg" file, then run it and it will disable windows keys

Left windows Key only:

Windows Registry Editor Version 5.00

[HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Keyboard Layout]
"Scancode Map"=hex:00,00,00,00,00,00,00,00,02,00,00,00,00,00,5B,E0,00,00,00,00

Right Windows Key Only

Windows Registry Editor Version 5.00

[HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Keyboard Layout]
"Scancode Map"=hex:00,00,00,00,00,00,00,00,02,00,00,00,00,00,5C,E0,00,00,00,00

Both:

Windows Registry Editor Version 5.00

[HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Keyboard Layout]
"Scancode Map"=hex:00,00,00,00,00,00,00,00,03,00,00,00,00,00,5B,E0,00,00,5C,E0,00,00,00,00

Edit:

Note: Restart is required for changes to take effect. And this will remove it:

Windows Registry Editor Version 5.00

[HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Keyboard Layout]
"Scancode Map"=0

WinKeyHook.dll

Link to comment
Share on other sites

I have pretty given up on doing it directly in my program. I am trying out several programs to disable the Start Menu opening when pressing the Windows key:

DisableWinKey

WKeyKill

WinkeyDisabler

EasyWinKeyBlocker

Ill try the FileInstall with each of these, thanks for the suggestion.

Ill post here stating which ones work the best. By the way, the WinKey program I was using before is buggy: it does not always work and it causes programs like GIMP to crash when using internal keyboard shortcuts such as ctrl+O.

Thank you for all your help,

BTH

This is an excellent software and very small. You can add in your script with FileInstall().

Link to comment
Share on other sites

Such as using Win+w to send PgUp, which causes the Start Menu to open and looses focus of the active window.

Could we see the script for that? In my experience that just shouldn't happen...

HotKeySet('{esc}', '_Exit')
HotKeySet('#w', '_HotKey')

Func _HotKey()
    Send('{PgUp}')
EndFunc

While 1
    Sleep(10)
WEnd

Func _Exit()
    Exit
EndFunc

This doesn't open the start menu at all when I press Win+W. Have I misunderstood something?

Link to comment
Share on other sites

The Start Menu opening occurs more often when sending Ctrl+f4 or Alt+f4. I have attached my current script which uses Win+B and Win+5 to perform those actions. I tried reducing my Sleep time to 10 but that didn't help so I set it back to 100.

I also found another peculiar phenomenon. If I define a Win+Alt+ hotkey to send a Ctrl+ combination. This causes the alt key to become locked as if you have sent an AltDown keycode, very annoying. After experimenting some I found this only happened when pressing the right Alt key; so I remapped the right Alt key to the left Alt keycode and it fixed the problem. Out of curiosity, I also found that the exact same phenomenon exists for the Ctrl and Shift keys. BTW, I used KeyTweak to do the remapping, all it does is make the appropriate Registry edits to perform the remappings.

Andreik, thanks for suggesting WKeyKill; it seems to fix my problem with the Start Menu opening and the Windows key getting stuck in a WinDown state. I tested four different programs to prevent the Start Menu opening and it worked the best. The results of my test are below if anyone is interested.

Thanks for your help,

BTH

DisableWinKey: Freeware. Does not work if run from the Startup folder.

Private bytes: 1040K

Virtual size: 31800K

Working bytes: 3344K

WKeyKill: Freeware. Works from Startup folder. No icon in taskbar.

Private bytes: 780K

Virtual size: 20608K

Working bytes: 2896K

WinKey Disabler: Shareware, 15days free. Completely disables Windows key, including user defined Windows key shortcuts.

Private bytes: 5268K

Virtual size: 67576K

Working bytes: 11904K

Easy WinKey Blocker: Nagware, every five times it blocks Windows key it nags you to purchase. Completely disables Windows key, including user defined Windows key shortcuts.

Private bytes: 17220K

Virtual size: 144916K

Working bytes: 19040K

HotKeys.au3

Link to comment
Share on other sites

... This causes the alt key to become locked as if you have sent an AltDown keycode, very annoying. ...

Pretty much any modifier key can get "stuck down".

See http://svn.autoitscript.com/trac/ticket/231 and http://www.autoitscript.com/forum/index.ph...mp;#entry512706 There are many more such posts and attempts at working around it.

[size="1"][font="Arial"].[u].[/u][/font][/size]

Link to comment
Share on other sites

  • 3 months later...

I use the following at work.

Not sure if it's been mentioned above, but this works as it should across multiple computer configurations.

RegWrite("HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Keyboard Layout", "Scancode Map", "REG_BINARY", "0x00000000000000000300000000005BE000005CE000000000")
Edited by kjcdude
Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...