This CPH method uses the SendKeys method.
The keyPress string argument needs to be enclosed in curly brackets {}.
To use key combinations such as Shift, and Alt, you can use code modifiers listed in the link below.
public void KeyboardPress(string keyPress)
The keystroke to send.
void
using System;
public class CPHInline
{
public bool Execute()
{
// Examples:
// 'W'
CPH.KeyboardPress("{W}");
// 'DOWN ARROW'
CPH.KeyboardPress("{DOWN}");
// 'SHIFT' and 'W'
CPH.KeyboardPress("+{W}");
// 'CTRL' and 'W'
CPH.KeyboardPress("^{W}");
// 'ALT' and 'W'
CPH.KeyboardPress("%{W}");
return true;
}
}