SendKeys is the main class used. Send () to the active application by sending the click action behavior.
Example: SendKeys. Send ("123 ");
It will simulate the keyboard Hitting 1, 2, 3 ,;
Each key is represented by one or more characters. To specify a single keyboard character, use the character itself. For example, to represent the letter A, pass the string "A" to the method. To indicate multiple characters, append each additional character to the end of the character before it. To indicate letters A, B, and C, specify the parameter as "ABC ".
Plus sign (+), inserted symbol (^), percent sign (%), wave number (~) And parentheses () have special meanings for SendKeys. To specify a character in these characters, place it in braces. For example, to specify a plus sign, use "{+ }". To specify braces, use "{{}" and "{}}". Brackets ([]) have no special meaning for SendKeys, but must be placed in braces. In other applications, brackets have special meanings, which may play an important role in the occurrence of Dynamic Data Exchange (DDE.
Below isSendKeys.
Key code
BACKSPACE {BACKSPACE}, {BS}, or {BKSP}
BREA {BREAK}
Caps lock {CAPSLOCK}
DEL or DELETE {DELETE} or {DEL}
Down ArrowKey {DOWN}
END {END}
ENTER {ENTER} Or ~
ESC {ESC}
HELP {HELP}
HOME {HOME}
INS, INSERT {INSERT}, or {INS}
LEFT arrow {LEFT}
Num lock {NUMLOCK}
Page down {PGDN}
Page up {PGUP}
Print screen {PRTSC} (reserved for future use)
RIGHT arrow {RIGHT}
Scroll lock {SCROLLLOCK}
TAB {TAB}
UP Arrow {UP}
F1 {F1}
F2 {F2}
F3 {F3}
F4 {F4}
F5 {F5}
F6 {F6}
F7 {F7}
F8 {F8}
F9 {F9}
F10 {F10}
F11 {F11}
F12 {F12}
F13 {F13}
F14 {F14}
F15 {F15}
F16 {F16}
Numeric keypad plus sign {ADD}
Keyboard minus {SUBTRACT}
Numeric keypad multiplication number {MULTIPLY}
Keypad division {DIVIDE}
To specify keys that can be used with any combination of SHIFT, CTRL, and ALT keys, add one or more codes before these key codes:
Key code
SHIFT +
CTRL ^
ALT %