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 

Possible bug with shift keys

 
Reply to topic    AutoHotkey Community Forum Index -> Bug Reports
View previous topic :: View next topic  
Author Message
Superfraggle



Joined: 02 Nov 2004
Posts: 1019
Location: London, UK

PostPosted: Mon Jun 08, 2009 9:01 pm    Post subject: Possible bug with shift keys Reply with quote

The following simple script designed to work like a shift lock - for me at least, will only work with the left shift key.

Pressing right shift will activate it, but will not deactivate it, only left shift will deactivate it.

Code:
$shift::
Shifted:=!Shifted
If (shifted)
  Send,{Shift Down}
else
  Send,{Shift UP}
REturn

_________________
Steve F AKA Superfraggle

http://r.yuwie.com/superfraggle
Back to top
View user's profile Send private message MSN Messenger
sinkfaze



Joined: 18 Mar 2008
Posts: 5044
Location: the tunnel(?=light)

PostPosted: Mon Jun 08, 2009 9:12 pm    Post subject: Reply with quote

I was working on that post at the same time you were, I initially tried a similar method and couldn't get the shift key to toggle back and forth at all. Even with your method I'm still unable to get it to work. Seems like it must be intentional but I couldn't find any documentation on it.
_________________
Try Quick Search for Autohotkey or see the tutorial for newbies.
Back to top
View user's profile Send private message Send e-mail
Lexikos



Joined: 17 Oct 2006
Posts: 7295
Location: Australia

PostPosted: Sat Jun 20, 2009 4:22 pm    Post subject: Reply with quote

The solution seems to be to use *Shift:: instead of Shift::, or both Shift:: and +RShift::. Since +Shift does not work in place of +RShift, I suppose there's a bug. It seems to also apply to LCtrl/RCtrl and LAlt/RAlt.

When I tried adapting the script to deal with LWin, it seemed to get stuck down. I'm not sure if its related though since there is no neutral 'Win' key, and I have no RWin key to test with.

Since the RegisterHotkey (reg) method usually doesn't work for modifier keys, $ is usually unnecessary. RegisterHotkey seems to succeed for some odd hotkeys (like #LWin), though.
Back to top
View user's profile Send private message Visit poster's website
Display posts from previous:   
Reply to topic    AutoHotkey Community Forum Index -> Bug Reports 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