Simulate an input - Mistium/Origin-OS GitHub Wiki

In order to use these commands you need the below permission:

"simulate inputs"

Get the permission by running

permission "request" "simulate inputs"

The user will be asked to aprove or deny the permission.

Examples

simulate "keypress" "A"
// Simulates the key "A" being pressed

simulate "keypress" "Space"
// Simulates the key "A" being pressed

simulate "leftclick" x y
// Simulates a left click at a global x y, not bound to your window

simulate "middleclick" x y
// Simulates a middle click at a global x y, not bound to your window

simulate "rightclick" x y
// Simulates a right click at a global x y, not bound to your window