SendKeys.SendWait method in C#, emulating CTRL+C

10,326

Solution 1

You need to put in parenthesis. Example:

SendKeys.SendWait("^(c)");

Notice that c should be lowercase. It is case sensitive

Solution 2

use + instead of ^ for shift and put in parenthesis. (^ for control and + for shift; in your question you said shift). And remember c must be in lowercase.

SendKeys.SendWait("+(c)");
Share:
10,326
Patryk
Author by

Patryk

:)

Updated on July 05, 2022

Comments

  • Patryk
    Patryk almost 2 years

    I'm trying to hold down CTRL while C is pressed but I can't get it work. I've read SendKeys Class but still, it doesn't work.

    Thats what I've tried:

    SendKeys.SendWait("^C");
    SendKeys.SendWait("{^C}");
    SendKeys.SendWait("^{C}");
    SendKeys.SendWait("^(C)");
    SendKeys.SendWait("(^{C})");