Jump to content

Sky Slate Blueberry Blackcurrant Watermelon Strawberry Orange Banana Apple Emerald Chocolate
Photo

Can the WinKey be truly disabled?


  • Please log in to reply
27 replies to this topic
InTime69
  • Members
  • 8 posts
  • Last active: Mar 07 2011 07:52 PM
  • Joined: 04 Mar 2011
Hi,

As an AutoIt user, I am truly impressed by what AutoHotKey can do. I am just wondering if, according to you guys, it's truly possible to disable the Win Key?

I know that the following code can do it:
LWin:: return 
RWin:: return
#::
However, if, for example, you try Win+L+R at the same time, even if LockWorkStation is disabled via the registry:
RegWrite("HKEY_CURRENT_USER\SOFTWARE\Microsoft\Windows\CurrentVersion\Policies\System\", "DisableLockWorkstation", "REG_DWORD", 1) (Kill and restart Explorer to test)
the Run dialog will still open and any other Win Key combination still works:

Win+L+M; Win+L+D; Win+L+1; Win+L+2; Win+L+3; Win+L+4; Win+L+5; Win+L+6; Win+L+7; Win+L+8; Win+L+9; Win+L+0

to name but a few. They all work! Quite the loop hole!

Can any body figure out a way to disable the Win key when used in combination with Win+L? The only way I found was to kill Explorer but I want to avoid that if at all possible.

Any help would be greatly appreciated!

Ian

P.S.: Under Vista and Windows 7, Win+L is just as powerful as Ctrl+Alt+Del - unless of course you kill Explorer.

sumon
  • Moderators
  • 1317 posts
  • Last active: Dec 05 2016 10:14 PM
  • Joined: 18 May 2010
Try adding *, I think that should also block any key combination including the winkey.

Check out <!-- m -->http://www.autohotke...ocs/Hotkeys.htm<!-- m --> for more info.

  • Guests
  • Last active:
  • Joined: --

Try adding *, I think that should also block any key combination including the winkey.

Check out <!-- m -->http://www.autohotke...ocs/Hotkeys.htm<!-- m --> for more info.

Thanks for the advice but it didn't help... It seems like the Win+L combination re-enables the Win key regardless.

If anybody else has advice regarding this issue, please don't hesitate to post your comment. It would be greatly appreciated!

Ian

InTime69
  • Members
  • 8 posts
  • Last active: Mar 07 2011 07:52 PM
  • Joined: 04 Mar 2011
Oops! Looks like I answered as a guest. The above reply is mine. Sorry!

Ian

None
  • Members
  • 3199 posts
  • Last active: Nov 05 2015 09:55 PM
  • Joined: 28 Nov 2009
In Vista and above Win+l has become like !^Del Ahk can detect it but not block the system from getting it :(

You can disable them with a registry change :)
How to Enable or Disable Windows Key Shortcuts in Windows 7

InTime69
  • Members
  • 8 posts
  • Last active: Mar 07 2011 07:52 PM
  • Joined: 04 Mar 2011
Wow! Thanks so much! I can't believe I wasn't able to find that after all my research. I upgraded to Windows 7 Ultimate 64 bit (from Home Premium) a few days ago so I am able to see the changes in Group Policies. All the secrets are in there! lol

Do you know (or anybody) if there is any way to apply this without logging off or killing/restarting Explorer?

If this would be possible, it would be so great! Restarting Explorer is easy but it does mess up the tray icons (a lot of them disappear) and also a lot of applications get a second icon in the taskbar with a blank window - not to mention that the sidebar application on my system now appears in the taskbar with 9 blank windows. If you close the windows, the sidebar freezes and must be killed via TaskMgr.

Any further help with this would be greatly appreciated. Here is my question again: Is it possible to apply the following registry change without restarting Explorer or logging off?

Windows Registry Editor Version 5.00

[HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Policies\Explorer]
"NoWinKeys"=dword:00000001

Please help :?:

Thanks in advance,

Ian

Da Rossa
  • Members
  • 401 posts
  • Last active: Mar 26 2016 10:20 AM
  • Joined: 06 Dec 2007
Since this is a rather new topic and related to my question, please allow me to "hijack" it.

Lets say I want the Windows Key not to bring up the Start Menu. Still, I have many, many Winkey based hotkeys which I wouldn't like to disable.

So, is there a way to prevent the Windows Key from popping the StartMenu, but leaving other functionalities on, such as Win+R to run, Win+E to open Windows Explorer, and all my hotkeys, including or not other modifiers such as !^+ or the L key?

Thanks!
AHK is perfect.

sumon
  • Moderators
  • 1317 posts
  • Last active: Dec 05 2016 10:14 PM
  • Joined: 18 May 2010

Since this is a rather new topic and related to my question, please allow me to "hijack" it.

Lets say I want the Windows Key not to bring up the Start Menu. Still, I have many, many Winkey based hotkeys which I wouldn't like to disable.

So, is there a way to prevent the Windows Key from popping the StartMenu, but leaving other functionalities on, such as Win+R to run, Win+E to open Windows Explorer, and all my hotkeys, including or not other modifiers such as !^+ or the L key?

Thanks!


Read the first post again. He had this very problem - which is your solution.

Da Rossa
  • Members
  • 401 posts
  • Last active: Mar 26 2016 10:20 AM
  • Joined: 06 Dec 2007
Sorry sir but I still didn't get it. I know that

LWin:: return
RWin:: return
#::


Is applicable to disable the Winkey completely.

But that registry entry doesn't even exist here in my SO (Windows XP SP3).

And, trust me, I didn't get what exactly InTime69 meant with "Win+L+R", since pressing Win+L in this order will, unless the solution is achieved, lock the computer. And doing in the reverse order will pop up the Run dialog. I don't see the point in Win+L+R, sorry.
AHK is perfect.

Hamlet
  • Members
  • 302 posts
  • Last active: Mar 23 2014 03:37 PM
  • Joined: 22 Jan 2009
Try this registry.

[HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Keyboard Layout]


It is where you can do all keyboard remapping.
Actually, remapping programs, such as KeyTweak OR Sharpkeys handle only this registry. AHK can easily hadle this too (I guess, sorry I did not test it, I guess not that much difficult).

4 Ur ref.

5b,e0 <-- Left Win
5c,e0 <-- Right Win
5d,e0 <-- Context


Good Luck !!

Da Rossa
  • Members
  • 401 posts
  • Last active: Mar 26 2016 10:20 AM
  • Joined: 06 Dec 2007
Sorry, but I don't know what to do inside that depth in Regedit. Just for you to get the gist about my confusion, there are, in here:

* HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Keyboard Layout

AND

* HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Keyboard Layouts

There is nothing in the first, but in the second I see multiple "folders". Inside one of them, taken at random, I see four values: default, layout display name, layout file and layout text. @ layout Display Name, the value data is

@%SystemRoot%\system32\input.dll,-5128


ok, ok... so what? :(
AHK is perfect.

Hamlet
  • Members
  • 302 posts
  • Last active: Mar 23 2014 03:37 PM
  • Joined: 22 Jan 2009
Dude..

Just try to use special programs. They are already there for you.

I recommend Sharpkeys.

It is free of charge and very strong (In my opinion it is better than Keytweak).

OK ??

Good Luck.

Da Rossa
  • Members
  • 401 posts
  • Last active: Mar 26 2016 10:20 AM
  • Joined: 06 Dec 2007
You're telling me to use one more program just to do this little trick? Or are you saying should give up AHK because it's 'too tricky'? If that's what you're saying, then thanks for your tip, but I'll pass.
AHK is perfect.

Hamlet
  • Members
  • 302 posts
  • Last active: Mar 23 2014 03:37 PM
  • Joined: 22 Jan 2009

You're telling me to use one more program just to do this little trick? Or are you saying should give up AHK because it's 'too tricky'? If that's what you're saying, then thanks for your tip, but I'll pass.


Sorry, You are WRONG.

AHK is very useful and very nice. But it is not PERFECT at all.
AHK is one of a kind. There are bunch of tools you have to use for your variety of aims.
AHK only ? Pssst... forget it. (But, remember, AHK could handle the same keyboard mapping registry.)

If you want to disable Win key, Really. You have to change Keyboard controller physically which is deep inside the device. And, 2nd best idea is to change device driver, 3rd is to change registry, and what is the next ? Yes, OS level or the next is AHK.

It is the way to go. It is the AHK.


OK ?? Wake Up !!!!

Da Rossa
  • Members
  • 401 posts
  • Last active: Mar 26 2016 10:20 AM
  • Joined: 06 Dec 2007
Thaaaanks! Now we're communicating!!

1 - I understand AHK is not perfect.
2 - It's one of a kind, but I like it's flexibility and variety of possibilities.
3 - I'm not currently capable of dedicating time to learn another similar program, and I have a feeling that the developer(s) do it great. So AHK is the only thing right now.

And pleaaase, I don't want to disable the Windows Key!! I need it enabled and functional! I want it to do everything it does, with and without ahk (native combo shortcuts like Win+R) and ahk-defined hotkeys!! the only think I'd like to prevent is the start menu to be activated!! ;)

Edit: in time, you might have read my signiture. Don't take it literally; it's a moral encouragement to Chris. Not saying he needs it.
AHK is perfect.