ClassKeyBoard
Keyboard events class.
Definition
Namespace:ArtOfTest.WebAii.Win32
Assembly:ArtOfTest.WebAii.dll
Syntax:
public class KeyBoard
Inheritance: objectKeyBoard
Fields
Properties
KeyDownDelay
The amount of time a key is held down for during simulated typing
Methods
KeyDown(Keys)
Simulates a key down. (Press-Hold)
KeyPress(Keys)
Simulates a keyboard key press (down/up).
KeyPress(Keys, int)
Simulates a keyboard key press with a hold delay
KeyPress(Keys, int, int)
Repeat a set of key presses x number of times
KeyUp(Keys)
Simulates a key up. (Key-Release)
KeysFromString(string)
Converts a key combination i.e CTRL+R or SHIFT+CTRL+R to a System.Windows.Keys value
PressOrReleaseKey(Keys, bool)
Press or release a key.
TypeText(string, int)
Types text one character at a time with a specific type speed. This function does not support special keywords (i.e {TAB}, {SPACE}) or special characters like ^,+..etc. to simulate special keys use KeyPress if you want to send special characters like Ctrl/Shift..etc.
TypeText(string, int, int)
Types text one character at a time with a specific type speed. This function does not support special keywords (i.e {TAB}, {SPACE}) or special characters like ^,+..etc. to simulate special keys use KeyPress if you want to send special characters like Ctrl/Shift..etc.
TypeText(string, int, int, bool)
Types text one character at a time with a specific type speed. This function does not support special keywords (i.e {TAB}, {SPACE}) or special characters like ^,+..etc. to simulate special keys use KeyPress if you want to send special characters like Ctrl/Shift..etc.
Declaration
public void TypeText(string text, int delayBetweenKeypresses, int keyHoldTime, bool supportUnicode)
Parameters
text
The text to type
delayBetweenKeypresses
The delay time between key presses.
keyHoldTime
The delay between pressing and releasing a key
supportUnicode
Whether to support Unicode input in this call. By default, supportUnicode is true. See remarks regarding keyboard events and Unicode input.
Remarks
When Unicode support is enabled, KeyDown and KeyUp events are not fired by target controls. If KeyDown and KeyUp events are required, you must call TypeText with supportUnicode = false.
TypeTextNU(string, int, int)
Types text one character at a time with a specific type speed. This function does not support special keywords (i.e {TAB}, {SPACE}) or special characters like ^,+..etc. to simulate special keys use SendString if you want to send special characters like Ctrl/Shift..etc.
TypeTextUnicodeInt(string, int, int)
Type text in unicode.