key (former press_key_by_code before version 4.9.21)
key($code); - this function is used to emulate pressing a key with the specified code at the hardware level, relative to the current window (input focus is passed to the current window when calling this function)
the input Function accepts parameters:
$code – code of the pressed key.
After testing, the function returns the result of its work to the script :
true – emulation was done
false – emulation was not successful