AutoHotkey Community

It is currently May 27th, 2012, 4:29 am

All times are UTC [ DST ]




Post new topic Reply to topic  [ 3 posts ] 
Author Message
PostPosted: February 26th, 2010, 10:50 pm 
Offline

Joined: January 29th, 2008, 12:55 am
Posts: 17
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.


Report this post
Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: February 27th, 2010, 5:08 am 
Offline

Joined: December 21st, 2008, 7:29 pm
Posts: 181
Another workaround
Code:
AppsKey & RShift::
RShift & AppsKey::
KeyWait, RShift
InputBox, UserInput, Text Entry Box, Enter text., , 490, 119
Return


Report this post
Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: March 1st, 2010, 10:34 pm 
Offline

Joined: January 29th, 2008, 12:55 am
Posts: 17
I like your solution. I think it's definitely cleaner than my two. Thanks.


Report this post
Top
 Profile  
Reply with quote  
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 3 posts ] 

All times are UTC [ DST ]


Who is online

Users browsing this forum: Google Feedfetcher and 3 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