I'm trying to Send right Shift+Ctrl to my RichTextBox
. But as default it sends the left keys.
SendKeys.Send("^+");
Is there anyway to simulate right Shift+Ctrl?
Yes you can, you can check the Virtual-Key Codes where the code for the right shift key and right control key is
VK_RSHIFT 0xA1
VK_RCONTROL 0xA3
So you can do like
public const int VK_RSHIFT = 0xA1;
public const int VK_RCONTROL= 0xA3;
or
You can try like this:
SendKeys.Send(VirtualKeyCode.VK_RSHIFT);
or else you can use the Keys Enumeration
Specifies key codes and modifiers.
which specifies
RShiftKey for the right shift key and RControlKey for the right control key.
or as commented by kevintjuh93
SendKeys.Send("^({RSHIFT}+)")
{RSHIFT}+
should work right? – kevintjuh93{RSHIFT}
throwsKeyword "RSHIFT" is not valid.
– Alex JoligPostMessage
now. Can you also tell me why you need to send these keys to your RTB? – kevintjuh93