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 

Shift key sticking down for 200 milliseconds.

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



Joined: 28 Jan 2008
Posts: 17

PostPosted: Fri Feb 26, 2010 9:50 pm    Post subject: Shift key sticking down for 200 milliseconds. Reply with quote

I found a case where a shift, when it is the second part of a hotkey appears to stick down long enough that it fools an InputBox into thinking it's down for the duration of the box's existence. Interestingly, if I reverse the order of the keys, the shift is no longer a problem. Here's my code.
Code:
AppsKey & RShift::
RShift & AppsKey::
;SendInput, {shiftup}
;Sleep, 200
InputBox, UserInput, Text Entry Box, Enter text., , 490, 119
Return

When I press AppsKey & RShift, whatever I type in the InputBox is in caps as if the shift key is stuck down. But if I use the RShift & AppsKey combination instead, it works correctly. My workaround for the AppsKey & RShift problem is to uncomment either of the two commented lines ({shiftup} or the Sleep) and that solves it. However, I thought this might be something that Chris would class as a bug in AHK and would want to fix it somewhere in the core AHK code.
Back to top
View user's profile Send private message
entropic



Joined: 21 Dec 2008
Posts: 181

PostPosted: Sat Feb 27, 2010 4:08 am    Post subject: Reply with quote

Another workaround
Code:

AppsKey & RShift::
RShift & AppsKey::
KeyWait, RShift
InputBox, UserInput, Text Entry Box, Enter text., , 490, 119
Return
Back to top
View user's profile Send private message
CyberUFO



Joined: 28 Jan 2008
Posts: 17

PostPosted: Mon Mar 01, 2010 9:34 pm    Post subject: Reply with quote

I like your solution. I think it's definitely cleaner than my two. Thanks.
Back to top
View user's profile Send private message
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