Link to home
Start Free TrialLog in
Avatar of submissiontechnology
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.
Avatar of glcummins
glcummins
Flag of United States of America image

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.
Avatar of submissiontechnology
submissiontechnology

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.
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
ASKER CERTIFIED SOLUTION
Avatar of Steve Bink
Steve Bink
Flag of United States of America image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Thanks routinet chr(1) did the trick.