BorlandTalk.com Forum Index BorlandTalk.com
Borland discussion newsgroups
 
Archives   FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

Stopping shift state from affecting sendkeys emulation

 
Post new topic   Reply to topic    BorlandTalk.com Forum Index -> Delphi (General)
View previous topic :: View next topic  
Author Message
Brian
Guest





PostPosted: Sun Feb 15, 2004 11:22 pm    Post subject: Stopping shift state from affecting sendkeys emulation Reply with quote



Hello,

I'm trying to perform a generic "sendkeys" type of function. I've
searched google and found quite a few nice code examples that work well
for basic injecting of keystrokes into the keyboard
(http://bdn.borland.com/article/0,1410,16500,00.html and
[url]http://homepages.borland.com/efg2lab/Library/UseNet/1999/0311c.txt)[/url].
The problem I'm having is that if I am holding down a shift key, those
are also getting processed.

How can I prevent the current shift state of the keyboard from affecting
those injected keys?

Example:
Sendkeys('test'); // lowercase

will properly send 'test'. If I call that function while I'm holding
down the Shift key, it will result in:

'TEST' // uppercase (shifted)

It's also affecting if I'm holding down Alt, Ctrl, and/or Win.

Does anyone have ideas about this?

Thanks,
Brian

Back to top
Display posts from previous:   
Post new topic   Reply to topic    BorlandTalk.com Forum Index -> Delphi (General) All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2006 phpBB Group
SEO toolkit © 2004-2006 webmedic.