key_down
key_down($key); - this function is used for full emulation of keystrokes on the keyboard (available from version 4.6.31)
the input Function accepts parameters:
$key – code of the key to simulate pressing. You can find out the code from the dialog for getting key codes by pressing a key. To do this, there is a menu item Tools->View keyboard codes with the Ctrl+Shift+K (int) hotkey.
If you press Ctrl while this function is running (or emulate pressing via the set_ctrl_prefix commands), the sent string will be interpreted as a set of hot keys for human.
After testing, the function returns the result of its work to the script :
true – successfully pressed the specified key(boolean)false – operation failed (boolean)