There are many options for stty. What I want is based on stty raw -echo: I'm wondering if I can add an option that makes the terminal driver send a signal when it sees e.g. ctrl+z, instead of having my program handle this keypress.
The raw option for stty is shorthand for -ignbrk -brkint -ignpar -parmrk -inpck -istrip -inlcr -igncr -icrnl -ixon -ixoff -icanon -opost -isig -iuclc -ixany -imax‐ bel -xcase min 1 time 0
The -isig in this list prevents the terminal from responding to e.g. CTRL-Z
Adding isig after raw (like in stty raw -echo isig) will cancel the -isig that is implicit in raw, and give you a terminal in raw mode that still responds to CTRL-Z (any of the characters INTR, QUIT, SUSP, or DSUSP, in fact)
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With