C# 클래스 WindowsInput.KeyboardSimulator

Implements the IKeyboardSimulator interface by calling the an IInputMessageDispatcher to simulate Keyboard gestures.
상속: IKeyboardSimulator
파일 보기 프로젝트 열기: Hebo/LeagueMaster 1 사용 예제들

공개 메소드들

메소드 설명
KeyDown ( VirtualKeyCode keyCode ) : void

Calls the Win32 SendInput method to simulate a KeyDown.

KeyPress ( VirtualKeyCode keyCode ) : void

Calls the Win32 SendInput method with a KeyDown and KeyUp message in the same input sequence in order to simulate a Key PRESS.

KeyUp ( VirtualKeyCode keyCode ) : void

Calls the Win32 SendInput method to simulate a KeyUp.

KeyboardSimulator ( ) : System

Initializes a new instance of the KeyboardSimulator class using an instance of a WindowsInputMessageDispatcher for dispatching INPUT messages.

KeyboardSimulator ( IInputMessageDispatcher messageDispatcher ) : System

Initializes a new instance of the KeyboardSimulator class using the specified IInputMessageDispatcher for dispatching INPUT messages.

ModifiedKeyStroke ( IEnumerable modifierKeyCodes, IEnumerable keyCodes ) : void

Simulates a modified keystroke where there are multiple modifiers and multiple keys like CTRL-ALT-K-C where CTRL and ALT are the modifierKeys and K and C are the keys. The flow is Modifiers KeyDown in order, Keys Press in order, Modifiers KeyUp in reverse order.

ModifiedKeyStroke ( IEnumerable modifierKeyCodes, VirtualKeyCode keyCode ) : void

Simulates a modified keystroke where there are multiple modifiers and one key like CTRL-ALT-C where CTRL and ALT are the modifierKeys and C is the key. The flow is Modifiers KeyDown in order, Key Press, Modifiers KeyUp in reverse order.

ModifiedKeyStroke ( VirtualKeyCode modifierKey, IEnumerable keyCodes ) : void

Simulates a modified keystroke where there is one modifier and multiple keys like CTRL-K-C where CTRL is the modifierKey and K and C are the keys. The flow is Modifier KeyDown, Keys Press in order, Modifier KeyUp.

ModifiedKeyStroke ( VirtualKeyCode modifierKeyCode, VirtualKeyCode keyCode ) : void

Simulates a simple modified keystroke like CTRL-C where CTRL is the modifierKey and C is the key. The flow is Modifier KeyDown, Key Press, Modifier KeyUp.

TextEntry ( string text ) : void

Calls the Win32 SendInput method with a stream of KeyDown and KeyUp messages in order to simulate uninterrupted text entry via the keyboard.

비공개 메소드들

메소드 설명
SendSimulatedInput ( INPUT inputList ) : int

Sends the list of INPUT messages using the IInputMessageDispatcher instance.

메소드 상세

KeyDown() 공개 메소드

Calls the Win32 SendInput method to simulate a KeyDown.
public KeyDown ( VirtualKeyCode keyCode ) : void
keyCode VirtualKeyCode The to press
리턴 void

KeyPress() 공개 메소드

Calls the Win32 SendInput method with a KeyDown and KeyUp message in the same input sequence in order to simulate a Key PRESS.
public KeyPress ( VirtualKeyCode keyCode ) : void
keyCode VirtualKeyCode The to press
리턴 void

KeyUp() 공개 메소드

Calls the Win32 SendInput method to simulate a KeyUp.
public KeyUp ( VirtualKeyCode keyCode ) : void
keyCode VirtualKeyCode The to lift up
리턴 void

KeyboardSimulator() 공개 메소드

Initializes a new instance of the KeyboardSimulator class using an instance of a WindowsInputMessageDispatcher for dispatching INPUT messages.
public KeyboardSimulator ( ) : System
리턴 System

KeyboardSimulator() 공개 메소드

Initializes a new instance of the KeyboardSimulator class using the specified IInputMessageDispatcher for dispatching INPUT messages.
If null is passed as the .
public KeyboardSimulator ( IInputMessageDispatcher messageDispatcher ) : System
messageDispatcher IInputMessageDispatcher The to use for dispatching messages.
리턴 System

ModifiedKeyStroke() 공개 메소드

Simulates a modified keystroke where there are multiple modifiers and multiple keys like CTRL-ALT-K-C where CTRL and ALT are the modifierKeys and K and C are the keys. The flow is Modifiers KeyDown in order, Keys Press in order, Modifiers KeyUp in reverse order.
public ModifiedKeyStroke ( IEnumerable modifierKeyCodes, IEnumerable keyCodes ) : void
modifierKeyCodes IEnumerable The list of modifier keys
keyCodes IEnumerable The list of keys to simulate
리턴 void

ModifiedKeyStroke() 공개 메소드

Simulates a modified keystroke where there are multiple modifiers and one key like CTRL-ALT-C where CTRL and ALT are the modifierKeys and C is the key. The flow is Modifiers KeyDown in order, Key Press, Modifiers KeyUp in reverse order.
public ModifiedKeyStroke ( IEnumerable modifierKeyCodes, VirtualKeyCode keyCode ) : void
modifierKeyCodes IEnumerable The list of modifier keys
keyCode VirtualKeyCode The key to simulate
리턴 void

ModifiedKeyStroke() 공개 메소드

Simulates a modified keystroke where there is one modifier and multiple keys like CTRL-K-C where CTRL is the modifierKey and K and C are the keys. The flow is Modifier KeyDown, Keys Press in order, Modifier KeyUp.
public ModifiedKeyStroke ( VirtualKeyCode modifierKey, IEnumerable keyCodes ) : void
modifierKey VirtualKeyCode The modifier key
keyCodes IEnumerable The list of keys to simulate
리턴 void

ModifiedKeyStroke() 공개 메소드

Simulates a simple modified keystroke like CTRL-C where CTRL is the modifierKey and C is the key. The flow is Modifier KeyDown, Key Press, Modifier KeyUp.
public ModifiedKeyStroke ( VirtualKeyCode modifierKeyCode, VirtualKeyCode keyCode ) : void
modifierKeyCode VirtualKeyCode The modifier key
keyCode VirtualKeyCode The key to simulate
리턴 void

TextEntry() 공개 메소드

Calls the Win32 SendInput method with a stream of KeyDown and KeyUp messages in order to simulate uninterrupted text entry via the keyboard.
public TextEntry ( string text ) : void
text string The text to be simulated.
리턴 void