| View previous topic :: View next topic |
| Author |
Message |
Superfraggle
Joined: 02 Nov 2004 Posts: 1019 Location: London, UK
|
Posted: Mon Jun 08, 2009 9:01 pm Post subject: Possible bug with shift keys |
|
|
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 |
|
 |
sinkfaze
Joined: 18 Mar 2008 Posts: 5044 Location: the tunnel(?=light)
|
Posted: Mon Jun 08, 2009 9:12 pm Post subject: |
|
|
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 |
|
 |
Lexikos
Joined: 17 Oct 2006 Posts: 7295 Location: Australia
|
Posted: Sat Jun 20, 2009 4:22 pm Post subject: |
|
|
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 |
|
 |
|