submissiontechnology
asked on
ASCII dec number for CTRL key
Can anyone tell me what is the ASCII decimal number for the control key? Or how to simulate it when sending a command to a process created with proc_open? Thanks.
Control is a modifier key, so I don't believe it has it's own number. Only when combined with another key does it gain an identifier.
ASKER
I see. How can I send it to the process then?
If you want to send signals to the open process use proc_terminate http://www.php.net/manual/en/function.proc-terminate.php
CRTL-C is typical converted to SIG-TERM when used from the shell so sendig it's ascii code will not be enough.
CRTL-C is typical converted to SIG-TERM when used from the shell so sendig it's ascii code will not be enough.
ASKER
I actually need to send CTRL-A followed by D (to detach screen)
why not start screen directly in detached mode via
screen -m -d cmd to execute
screen -m -d cmd to execute
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
Thanks routinet chr(1) did the trick.