BrammerTheHammer Posted September 25, 2008 Posted September 25, 2008 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
herewasplato Posted September 25, 2008 Posted September 25, 2008 (edited) BrammerTheHammer said: ... 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.aspxor at the current user level:http://www.pctools.com/guides/registry/detail/549/I've not tested this - I just Goolged "NoWinKeys" Edited September 25, 2008 by herewasplato [size="1"][font="Arial"].[u].[/u][/font][/size]
BrammerTheHammer Posted September 26, 2008 Author Posted September 26, 2008 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,BTHP.S. I do appreciate the quick response. herewasplato said: Maybe a RegWrite() to the area of interest:Either at the machine level for all users:http://technet.microsoft.com/en-us/library/cc757877.aspxor at the current user level:http://www.pctools.com/guides/registry/detail/549/I've not tested this - I just Goolged "NoWinKeys"
herewasplato Posted September 26, 2008 Posted September 26, 2008 BrammerTheHammer said: ... 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.htmlor this claims to do what the Winkey software does:http://mihai.bazon.net/blog/disable-win-key-in-windowsI did not test either...... [size="1"][font="Arial"].[u].[/u][/font][/size]
BrammerTheHammer Posted September 28, 2008 Author Posted September 28, 2008 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 herewasplato said: Doh! I missed that point.Try this:http://www.windowsnetworking.com/kbase/Win...onkeyboard.htmlor this claims to do what the Winkey software does:http://mihai.bazon.net/blog/disable-win-key-in-windowsI did not test either......
Paulie Posted September 28, 2008 Posted September 28, 2008 (edited) 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 September 28, 2008 by Paulie
BrammerTheHammer Posted October 4, 2008 Author Posted October 4, 2008 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 Paulie said: 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"=0WinKeyHook.dll
Andreik Posted October 4, 2008 Posted October 4, 2008 (edited) This is an excellent software and very small. You can add in your script with FileInstall(). Edited October 4, 2008 by Andreik
BrammerTheHammer Posted October 5, 2008 Author Posted October 5, 2008 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:DisableWinKeyWKeyKillWinkeyDisablerEasyWinKeyBlockerIll 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 Andreik said: This is an excellent software and very small. You can add in your script with FileInstall().
therks Posted October 5, 2008 Posted October 5, 2008 BrammerTheHammer said: 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? My AutoIt Stuff | My Github
BrammerTheHammer Posted October 7, 2008 Author Posted October 7, 2008 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,BTHDisableWinKey: Freeware. Does not work if run from the Startup folder.Private bytes: 1040KVirtual size: 31800KWorking bytes: 3344KWKeyKill: Freeware. Works from Startup folder. No icon in taskbar.Private bytes: 780KVirtual size: 20608KWorking bytes: 2896KWinKey Disabler: Shareware, 15days free. Completely disables Windows key, including user defined Windows key shortcuts.Private bytes: 5268KVirtual size: 67576KWorking bytes: 11904KEasy 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: 17220KVirtual size: 144916KWorking bytes: 19040KHotKeys.au3
herewasplato Posted October 7, 2008 Posted October 7, 2008 BrammerTheHammer said: ... 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]
kjcdude Posted January 14, 2009 Posted January 14, 2009 (edited) 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 January 14, 2009 by kjcdude
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now