Search code examples
c#keystroke

Multiple Keystrokes


I've been trying to figure out how to get multiple key strokes with a single command. The goal is to have an effect like:

SendKeys.Send({"TAB"}{"TAB"}{"ENTER"}{"TAB"}{"ENTER"}{"TAB"}{"ENTER"});

I've been able to get two key strokes to work such as

SendKeys.Send(^{"TAB"}) 

However this is press and hold control + press tab. The goal I want is not to hold down a key then press, but to have the button press register multiple times. Thank You!


Solution

  • SendKeys supports sending multiple keys. Why are you using incorrect syntax there? It should really be like:

    SendKeys.Send("{TAB}{TAB}{ENTER}{TAB}{ENTER}{TAB}{ENTER}");