Codecore Logo
Quick Search
»
Advanced Search »

Simulated Input

RSS
This driver simulated keyboard and mouse input. Because this driver interacts with the desktop, you must be running the Desktop Server application.

Manufacturer: N/A


Configuration Settings

  • Host Name : The host name or ip address of the computer to simulate keyboard and mouse input. Please ensure that the Desktop Server application is running on that computer.

Events

Ready State Changed

The device's running and ready state changed.

Whenever Filter:

none

EventArgs:

  • Number NewValue : The new property value.
  • Number PreviousValue : The previous property value.

Instance Properties

DeviceDisplayName

The display name for this device.

Accessibility : Read Only

Type: String

DeviceStartTime

The date and time when this device was started.

Accessibility : Read Only

Type: DateTime

DeviceLifecycleStage

The current lifecycle stage of the device. The stages in order are: Pending Start, Starting, Running, Stopping

Accessibility : Read Only

Type: Number

DeviceIsRunningAndReady

Indicates if the device is ready for use, ie it is in the Running lifecycle stage and all properties are valid and all methods are ready to be used.

Accessibility : Read Only

Type: Boolean

Instance Methods

OffsetCursor ( Number, Number )

Moves the screen mouse cursor by the specified offset.

Syntax

void OffsetCursor( Number pixelOffsetX, Number pixelOffsetY )

Parameters

pixelOffsetX : The number of pixels to move the cursor horizontally.
pixelOffsetY : The number of pixels to move the cursor vertically.

SetCursorPosition ( Number, Number )

Sets the screen mouse cursor to the specified position.

Syntax

void SetCursorPosition( Number pixelX, Number pixelY )

Parameters

pixelX : The X position of the cursor.
pixelY : The Y position of the cursor.

MouseClick ( Number )

Simulates a click of the a mouse button.

Syntax

void MouseClick( Number mouseButton )

Parameters

mouseButton : The mouse button.

0 = Left
1 = Middle
2 = Right

KeyDown ( Number )

Simulates pressing a keyboard key and holding it down. KeyUp should be called to simulate the release of the key.

Syntax

void KeyDown( Number keyCode )

Parameters

keyCode : The keycode, see the documentation for a list.

KeyUp ( Number )

Simulates releasing a keyboard key after a Key Down event.

Syntax

void KeyUp( Number keyCode )

Parameters

keyCode : The keycode, see the documentation for a list.

KeyPress ( Number )

Simulates pressing and releasing a keyboard key.

Syntax

void KeyPress( Number keyCode )

Parameters

keyCode : The keycode, see the documentation for a list.

ModifiedKeyStroke ( Number, Number )

Simulates pressing and holding a modifier key while another key is pressed and released.

Syntax

void ModifiedKeyStroke( Number modifierKeyCode, Number keyCode )

Parameters

modifierKeyCode : The modifier keycode, see the documentation for a list.
keyCode : The keycode, see the documentation for a list.

Example


siminput.ModifiedKeyStroke( 18, 13 ); // ALT+ENTER

TextEntry ( String )

Simulates entering text with the keyboard.

Syntax

void TextEntry( String text )

Parameters

text : The text to simulate entering.

SetPropertyForDuration ( String, TimeSpan, Object, Object )

Sets a property for a duration of time and then sets the property to a subequent value asynchronously. This action returns after setting the first value and the timer and subsequent property set run in the background. Subsequent sets of the same property will reset the timer if the subsequent value has not yet been set. This is an advanced feature, be sure to set the property name correctly.

Syntax

void SetPropertyForDuration( String propertyName, unknown duration, Object initialValue, Object finalValue )

Parameters

propertyName : The name of the property to set.
duration : The amount of time to wait after setting the initial value to set the subsequent value.
initialValue : The value to set the property to initially.
finalValue : The value to set the property to after the duration of time has passed.

SetPropertyForDuration ( String, Number, TimeSpan, Object, Object )

Sets a property for a duration of time and then sets the property to a subequent value asynchronously. This action returns after setting the first value and the timer and subsequent property set run in the background. Subsequent sets of the same property will reset the timer if the subsequent value has not yet been set. This is an advanced feature, be sure to set the property name correctly.

Syntax

void SetPropertyForDuration( String propertyName, Number arrayIndex, unknown duration, Object initialValue, Object finalValue )

Parameters

propertyName : The name of the property to set.
arrayIndex : The property's array index to set.
duration : The amount of time to wait after setting the initial value to set the subsequent value.
initialValue : The value to set the property to initially.
finalValue : The value to set the property to after the duration of time has passed.

Key Codes

  • 1 : Left mouse button
  • 2 : Right mouse button
  • 3 : Control-break processing
  • 4 : Middle mouse button (three-button mouse) - NOT contiguous with LBUTTON and RBUTTON
  • 5 : Windows 2000/XP: X1 mouse button - NOT contiguous with LBUTTON and RBUTTON
  • 6 : Windows 2000/XP: X2 mouse button - NOT contiguous with LBUTTON and RBUTTON
  • 7 : Undefined
  • 8 : BACKSPACE key
  • 9 : TAB key
  • 10 - 11 : Reserved
  • 12 : CLEAR key
  • 13 : ENTER key
  • 14 - 15 : Undefined
  • 16 : SHIFT key
  • 17 : CTRL key
  • 18 : ALT key
  • 19 : PAUSE key
  • 20 : CAPS LOCK key
  • 21 : Input Method Editor (IME) Kana mode
  • 21 : IME Hanguel mode (maintained for compatibility; use HANGUL)
  • 21 : IME Hangul mode
  • 22 : Undefined
  • 23 : IME Junja mode
  • 24 : IME final mode
  • 25 : IME Hanja mode
  • 25 : IME Kanji mode
  • 26 : Undefined
  • 27 : ESC key
  • 28 : IME convert
  • 29 : IME nonconvert
  • 30 : IME accept
  • 31 : IME mode change request
  • 32 : SPACEBAR
  • 33 : PAGE UP key
  • 34 : PAGE DOWN key
  • 35 : END key
  • 36 : HOME key
  • 37 : LEFT ARROW key
  • 38 : UP ARROW key
  • 39 : RIGHT ARROW key
  • 40 : DOWN ARROW key
  • 41 : SELECT key
  • 42 : PRINT key
  • 43 : EXECUTE key
  • 44 : PRINT SCREEN key
  • 45 : INS key
  • 46 : DEL key
  • 47 : HELP key
  • 48 : 0 key
  • 49 : 1 key
  • 50 : 2 key
  • 51 : 3 key
  • 52 : 4 key
  • 53 : 5 key
  • 54 : 6 key
  • 55 : 7 key
  • 56 : 8 key
  • 57 : 9 key
  • 58 - 64 : Undefined
  • 65 : A key
  • 66 : B key
  • 67 : C key
  • 68 : D key
  • 69 : E key
  • 70 : F key
  • 71 : G key
  • 72 : H key
  • 73 : I key
  • 74 : J key
  • 75 : K key
  • 76 : L key
  • 77 : M key
  • 78 : N key
  • 79 : O key
  • 80 : P key
  • 81 : Q key
  • 82 : R key
  • 83 : S key
  • 84 : T key
  • 85 : U key
  • 86 : V key
  • 87 : W key
  • 88 : X key
  • 89 : Y key
  • 90 : Z key
  • 91 : Left Windows key (Microsoft Natural keyboard)
  • 92 : Right Windows key (Natural keyboard)
  • 93 : Applications key (Natural keyboard)
  • 94 : reserved
  • 95 : Computer Sleep key
  • 96 : Numeric keypad 0 key
  • 97 : Numeric keypad 1 key
  • 98 : Numeric keypad 2 key
  • 99 : Numeric keypad 3 key
  • 100 : Numeric keypad 4 key
  • 101 : Numeric keypad 5 key
  • 102 : Numeric keypad 6 key
  • 103 : Numeric keypad 7 key
  • 104 : Numeric keypad 8 key
  • 105 : Numeric keypad 9 key
  • 106 : Multiply key
  • 107 : Add key
  • 108 : Separator key
  • 109 : Subtract key
  • 110 : Decimal key
  • 111 : Divide key
  • 112 : F1 key
  • 113 : F2 key
  • 114 : F3 key
  • 115 : F4 key
  • 116 : F5 key
  • 117 : F6 key
  • 118 : F7 key
  • 119 : F8 key
  • 120 : F9 key
  • 121 : F10 key
  • 122 : F11 key
  • 123 : F12 key
  • 124 : F13 key
  • 125 : F14 key
  • 126 : F15 key
  • 127 : F16 key
  • 128 : F17 key
  • 129 : F18 key
  • 130 : F19 key
  • 131 : F20 key
  • 132 : F21 key
  • 133 : F22 key
  • 134 : F23 key
  • 135 : F24 key
  • 136 - 143 : Unassigned
  • 144 : NUM LOCK key
  • 145 : SCROLL LOCK key
  • 146 - 150 : OEM Specific
  • 151 - 159 : Unassigned
  • NOTE: Left & Right Alt, Ctrl and Shift modifier keys are only used in special cases. It is usually best to specify the general Alt, Ctrl, and Shift keys.
  • 160 : Left SHIFT key - Used only as parameters to GetAsyncKeyState() and GetKeyState()
  • 161 : Right SHIFT key - Used only as parameters to GetAsyncKeyState() and GetKeyState()
  • 162 : Left CONTROL key - Used only as parameters to GetAsyncKeyState() and GetKeyState()
  • 163 : Right CONTROL key - Used only as parameters to GetAsyncKeyState() and GetKeyState()
  • 164 : Left MENU key - Used only as parameters to GetAsyncKeyState() and GetKeyState()
  • 165 : Right MENU key - Used only as parameters to GetAsyncKeyState() and GetKeyState()
  • 166 : Windows 2000/XP: Browser Back key
  • 167 : Windows 2000/XP: Browser Forward key
  • 168 : Windows 2000/XP: Browser Refresh key
  • 169 : Windows 2000/XP: Browser Stop key
  • 170 : Windows 2000/XP: Browser Search key
  • 171 : Windows 2000/XP: Browser Favorites key
  • 172 : Windows 2000/XP: Browser Start and Home key
  • 173 : Windows 2000/XP: Volume Mute key
  • 174 : Windows 2000/XP: Volume Down key
  • 175 : Windows 2000/XP: Volume Up key
  • 176 : Windows 2000/XP: Next Track key
  • 177 : Windows 2000/XP: Previous Track key
  • 178 : Windows 2000/XP: Stop Media key
  • 179 : Windows 2000/XP: Play/Pause Media key
  • 180 : Windows 2000/XP: Start Mail key
  • 181 : Windows 2000/XP: Select Media key
  • 182 : Windows 2000/XP: Start Application 1 key
  • 183 : Windows 2000/XP: Start Application 2 key
  • 184 - 185 : Reserved
  • 186 : Used for miscellaneous characters; it can vary by keyboard. Windows 2000/XP: For the US standard keyboard, the ';:' key
  • 187 : Windows 2000/XP: For any country/region, the '+' key
  • 188 : Windows 2000/XP: For any country/region, the ',' key
  • 189 : Windows 2000/XP: For any country/region, the '-' key
  • 190 : Windows 2000/XP: For any country/region, the '.' key
  • 191 : Used for miscellaneous characters; it can vary by keyboard. Windows 2000/XP: For the US standard keyboard, the '/?' key
  • 192 : Used for miscellaneous characters; it can vary by keyboard. Windows 2000/XP: For the US standard keyboard, the '`~' key
  • 193 - 215 : Reserved
  • 216 - 218 : Unassigned
  • 219 : Used for miscellaneous characters; it can vary by keyboard. Windows 2000/XP: For the US standard keyboard, the '[{' key
  • 220 : Used for miscellaneous characters; it can vary by keyboard. Windows 2000/XP: For the US standard keyboard, the '\|' key
  • 221 : Used for miscellaneous characters; it can vary by keyboard. Windows 2000/XP: For the US standard keyboard, the ']}' key
  • 222 : Used for miscellaneous characters; it can vary by keyboard. Windows 2000/XP: For the US standard keyboard, the 'single-quote/double-quote' key
  • 223 : Used for miscellaneous characters; it can vary by keyboard.
  • 224 : Reserved
  • 225 : OEM Specific
  • 226 : Windows 2000/XP: Either the angle bracket key or the backslash key on the RT 102-key keyboard
  • 227 - 228 : OEM specific
  • 229 : Windows 95/98/Me, Windows NT 4.0, Windows 2000/XP: IME PROCESS key
  • 230 : OEM specific
  • 231 : Windows 2000/XP: Used to pass Unicode characters as if they were keystrokes. The PACKET key is the low word of a 32-bit Virtual Key value used for non-keyboard input methods. For more information, see Remark in KEYBDINPUT, SendInput, WM_KEYDOWN, and WM_KEYUP
  • 232 : Unassigned
  • 233 - 245 : OEM specific
  • 246 : Attn key
  • 247 : CrSel key
  • 248 : ExSel key
  • 249 : Erase EOF key
  • 250 : Play key
  • 251 : Zoom key
  • 252 : Reserved
  • 253 : PA1 key
  • 254 : Clear key

Privacy Policy | Conditions Of Use

Copyright ©2014 Codecore Technologies, All rights reserved.