AutoHotkey Community

It is currently May 27th, 2012, 6:40 am

All times are UTC [ DST ]




Post new topic Reply to topic  [ 28 posts ]  Go to page 1, 2  Next
Author Message
PostPosted: March 4th, 2011, 8:38 pm 
Offline

Joined: March 4th, 2011, 8:13 pm
Posts: 8
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:
Code:
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:
Code:
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.


Last edited by InTime69 on March 4th, 2011, 11:11 pm, edited 1 time in total.

Report this post
Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: March 4th, 2011, 10:10 pm 
Offline
User avatar

Joined: May 18th, 2010, 3:10 pm
Posts: 1179
Location: Sweden
Try adding *, I think that should also block any key combination including the winkey.

Check out http://www.autohotkey.com/docs/Hotkeys.htm for more info.

_________________
~sumon Appifyer AHK Nova halted Recommended: AHK_L (Why?)


Report this post
Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: March 4th, 2011, 10:42 pm 
sumon wrote:
Try adding *, I think that should also block any key combination including the winkey.

Check out http://www.autohotkey.com/docs/Hotkeys.htm 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


Report this post
Top
  
Reply with quote  
 Post subject:
PostPosted: March 4th, 2011, 10:44 pm 
Offline

Joined: March 4th, 2011, 8:13 pm
Posts: 8
Oops! Looks like I answered as a guest. The above reply is mine. Sorry!

Ian


Report this post
Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: March 5th, 2011, 1:12 am 
Offline

Joined: November 28th, 2009, 4:45 am
Posts: 3089
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


Report this post
Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: March 5th, 2011, 2:45 am 
Offline

Joined: March 4th, 2011, 8:13 pm
Posts: 8
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?

Code:
Windows Registry Editor Version 5.00

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


Please help :?:

Thanks in advance,

Ian


Report this post
Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: May 4th, 2011, 6:00 am 
Offline

Joined: December 6th, 2007, 12:48 pm
Posts: 364
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.


Report this post
Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: May 4th, 2011, 9:05 am 
Offline
User avatar

Joined: May 18th, 2010, 3:10 pm
Posts: 1179
Location: Sweden
Da Rossa wrote:
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.

_________________
~sumon Appifyer AHK Nova halted Recommended: AHK_L (Why?)


Report this post
Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: May 5th, 2011, 2:50 am 
Offline

Joined: December 6th, 2007, 12:48 pm
Posts: 364
Sorry sir but I still didn't get it. I know that

Code:
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.


Report this post
Top
 Profile  
Reply with quote  
 Post subject: Yes, Why not.
PostPosted: May 5th, 2011, 2:58 am 
Offline

Joined: January 22nd, 2009, 9:57 am
Posts: 116
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 !!


Last edited by Hamlet on May 5th, 2011, 7:13 am, edited 1 time in total.

Report this post
Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: May 5th, 2011, 3:05 am 
Offline

Joined: December 6th, 2007, 12:48 pm
Posts: 364
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

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


ok, ok... so what? :(

_________________
AHK is perfect.


Report this post
Top
 Profile  
Reply with quote  
PostPosted: May 5th, 2011, 3:08 am 
Offline

Joined: January 22nd, 2009, 9:57 am
Posts: 116
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.


Last edited by Hamlet on May 5th, 2011, 7:13 am, edited 1 time in total.

Report this post
Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: May 5th, 2011, 3:17 am 
Offline

Joined: December 6th, 2007, 12:48 pm
Posts: 364
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.


Report this post
Top
 Profile  
Reply with quote  
 Post subject: Only A program language.
PostPosted: May 5th, 2011, 3:26 am 
Offline

Joined: January 22nd, 2009, 9:57 am
Posts: 116
Da Rossa wrote:
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 !!!!


Last edited by Hamlet on May 5th, 2011, 7:12 am, edited 1 time in total.

Report this post
Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: May 5th, 2011, 4:03 am 
Offline

Joined: December 6th, 2007, 12:48 pm
Posts: 364
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.


Report this post
Top
 Profile  
Reply with quote  
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 28 posts ]  Go to page 1, 2  Next

All times are UTC [ DST ]


Who is online

Users browsing this forum: batto, Bing [Bot], Exabot [Bot], JSLover and 59 guests


You can post new topics in this forum
You can reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Powered by phpBB® Forum Software © phpBB Group