Simulate-Key
Command Description
Simulate Keyboard key
Command Prototype
Keyboard.Press(sKey, sType, sKeyModifiers,optionArgs)
Parameter Description
Parameter | Required | Type | Default | Description |
---|---|---|---|---|
sKey | True | enum | "Enter" | Correspond to the content to be entered in one simulation |
sType | True | enum | "press" | The button types are: click (press), press (down), up (up) |
sKeyModifiers | True | set | [] | Keyboard keys used while a mouse action is triggered: Alt, Ctrl, Shift, Win |
iDelayAfter | None | number | 300 | Delay time (in milliseconds) after executing the activity is 300 milliseconds |
iDelayBefore | None | number | 200 | The delay time (in milliseconds) before any operations are executed is by default 200 milliseconds |
sSimulate | None | enum | "simulate" | The available operation types: Simulation operation(simulate)、 System message(message); by default: Simulation operation(simulate) |
Demo
TracePrint "--------------------simulate keypress--------------------"
// --------------------------------------------------------
// [Remarks] Simulate button
// Input parameter 1:
// sKey--simulate keys
// Input parameter 2:
// sType--key type (click/double-click/press/bounce)
// Input parameter 3:
// sKeyModifiers--Auxiliary keys
// Input parameter 4:
// optionArgs--Optional parameters (including: error continue execution/delay after execution/delay before execution/operation type).Type:Dict
// Command prototype: Keyboard.Press(sKey, sType, sKeyModifiers,optionArgs)
// --------------------------------------------------------
Keyboard.Press("Enter", "press", [],{"iDelayAfter": 300, "iDelayBefore": 200, "sSimulate": "simulate"})