How to send left/right shift key?

Please support our C# advertiser: Intel Parallel Studio Home
Thread Solved

Join Date: Apr 2008
Posts: 9
Reputation: MRafeie is an unknown quantity at this point 
Solved Threads: 0
MRafeie MRafeie is offline Offline
Newbie Poster

How to send left/right shift key?

 
0
  #1
Nov 15th, 2008
Hi
The System.Windows.Forms.SendKeys.Send method does not support sending Left or Right shift key. How can I send these keys in C#?

thanks in advance
Reply With Quote Quick reply to this message  
Join Date: Oct 2007
Posts: 172
Reputation: Jugortha is an unknown quantity at this point 
Solved Threads: 16
Jugortha Jugortha is offline Offline
Junior Poster

Re: How to send left/right shift key?

 
0
  #2
Nov 15th, 2008
SendKeys.Send("{your key code here}");
Reply With Quote Quick reply to this message  
Join Date: Apr 2008
Posts: 9
Reputation: MRafeie is an unknown quantity at this point 
Solved Threads: 0
MRafeie MRafeie is offline Offline
Newbie Poster

Re: How to send left/right shift key?

 
0
  #3
Nov 16th, 2008
What do you mean?!!!!!!!
SendKeys.Send("+") sends shiftKey only. But Right shift key, for example, can not be distinguished by this way.
Last edited by MRafeie; Nov 16th, 2008 at 1:50 am.
Reply With Quote Quick reply to this message  
Join Date: Nov 2008
Posts: 249
Reputation: Antenka has a spectacular aura about Antenka has a spectacular aura about Antenka has a spectacular aura about 
Solved Threads: 65
Antenka's Avatar
Antenka Antenka is offline Offline
Posting Whiz in Training

Re: How to send left/right shift key?

 
0
  #4
Nov 16th, 2008
So what if you can see the darkest side of me?
No one would ever change this animal I have become
Help me believe it's not the real me
Somebody help me tame this animal
Reply With Quote Quick reply to this message  
Join Date: Apr 2008
Posts: 9
Reputation: MRafeie is an unknown quantity at this point 
Solved Threads: 0
MRafeie MRafeie is offline Offline
Newbie Poster

Re: How to send left/right shift key?

 
0
  #5
Nov 17th, 2008
Originally Posted by Antenka View Post
Looke here:
http://forums.microsoft.com/MSDN/Sho...24210&SiteID=1
I tried keybd_event API function, but it doesn't work as expected! It can Not process Left or Right shift key correctly! This function only process Shift key. Take a look at this:
http://msdn.microsoft.com/en-us/libr...04(VS.85).aspx
Windows NT/2000/XP/Vista:This function has been superseded. Use SendInput instead.
Therefore, I tried to use SendInput function. But I couldn't! After that I found another note:
http://www.pinvoke.net/default.aspx/user32.SendInput
* VK_L* & VK_R* - left and right Alt, Ctrl and Shift virtual keys. * Used only as parameters to GetAsyncKeyState() and GetKeyState(). * No other API or message will distinguish left and right keys in this way. */
Now, Can anyone tell me how to send Left/Right Shift key?
Reply With Quote Quick reply to this message  
Join Date: Apr 2008
Posts: 9
Reputation: MRafeie is an unknown quantity at this point 
Solved Threads: 0
MRafeie MRafeie is offline Offline
Newbie Poster

Re: How to send left/right shift key?

 
0
  #6
Nov 23rd, 2008
My problem has been solved in MSDN C# general forum! You can refer to the following link:
http://social.msdn.microsoft.com/For...0-6d533def38a5
Reply With Quote Quick reply to this message  
Reply

This thread has been marked solved.
Perhaps start a new thread instead?
Message:



Similar Threads
Other Threads in the C# Forum
Thread Tools Search this Thread



About Us | Contact Us | Advertise | DaniWeb | Acceptable Use Policy | RSS Feed

©2003 - 2009 DaniWeb® LLC