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

Recommended Answers

All 5 Replies

SendKeys.Send("{your key code here}");

What do you mean?!!!!!!!
SendKeys.Send("+") sends shiftKey only. But Right shift key, for example, can not be distinguished by this way.

Looke here:

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:

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:

* 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?

Be a part of the DaniWeb community

We're a friendly, industry-focused community of 1.20 million developers, IT pros, digital marketers, and technology enthusiasts learning and sharing knowledge.