AutoHotkey Homepage AutoHotkey Community
Let's help each other out
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

Win key weirdness

 
Post new topic   Reply to topic    AutoHotkey Community Forum Index -> Ask for Help
View previous topic :: View next topic  
Author Message
Ethan
Guest





PostPosted: Tue Aug 03, 2004 8:08 am    Post subject: Win key weirdness Reply with quote

I wrote a script to create hotkeys for common accents and discovered the following slightly strange behavior I thought I'd bring to your attention:

The script used the winkey as the main modifier for the hotkeys. I generally find that I hit the left win key by accident, and I never use it's intended functionality (I rarely use the start menu at all, so I certainly don't need a keyboard shortcut for it), so I have the left win key disabled with a
Code:
Lwin::return
This seemed to disable all hotkeys involving the left win key as well (though the right one still worked fine, so my hotkeys were working). Strangely enough I discovered a fix to this problem. Adding a line such as
Code:
Lwin & z::return
enables using the Lwin as a modifier again, so all my
Code:
#'::
and the like worked with the Lwin again.
I think this is a bug, but it may just some intended interaction I'm not quite understanding.[/code]
Back to top
Chris
Site Admin


Joined: 02 Mar 2004
Posts: 10467

PostPosted: Tue Aug 03, 2004 10:39 am    Post subject: Reply with quote

That behavior is by design. Since many keyboards have 2 windows keys, defining #z (for example) makes the hotkey work with either LWin or RWin. But if you disable LWin entirely, only RWin will be available for use (assuming you have RWin on your keyboard).

But in your example, you explicitly use the disabled LWin key as a "prefix key", which causes it to become one that fires when the key is released. But since the LWin subroutine does nothing, no action occurs when the it is released, thus LWin is still disabled for all uses except hotkeys.

It's a little strange, but is documented somewhat on the Hotkeys page. Let me know if this behavior undesirable in any way (it wasn't clear from your post) or if you want to achieve some other effect.
Back to top
View user's profile Send private message Send e-mail
Ethan
Guest





PostPosted: Tue Aug 03, 2004 11:19 am    Post subject: Reply with quote

I wouldn't say the behavior in question is particularly undesirable from my point of view, just unexpected. I guess I hadn't fully understood the prefex key distinction, though now that I do a little better I can see why this should happen. What I had failed to grasp is that LWin wouldn't function as a modifier unless it's defined as a prefix key if the default functionality has been hotkeyed over to something else.
Back to top
Display posts from previous:   
Post new topic   Reply to topic    AutoHotkey Community Forum Index -> Ask for Help All times are GMT
Page 1 of 1

 
Jump to:  
You can post new topics in this forum
You can reply to topics in this forum


Powered by phpBB © 2001, 2005 phpBB Group