c++ - How to detect XOFF and XON in Linux terminal application -
certain control sequences have special effects in linux, such ctrl-c
sends sigint
. can handle signals enough, appears ctrl-s
(xoff) , ctrl-q
(xon) special snowflakes. know effect (to pause input) can disabled in console stty -ixon
, , use trickery run command, feels cheap workaround.
is there proper way rid these sequences of special effect , actual ascii values (^s
, ^q
) using system calls? know doable because text editor nano it, life of me can't find it's being handled. tried searching repo "xoff".
use tcgetattr() , tcsetattr() system calls turn off ixon
flag on standard input, explained in manual page.
Comments
Post a Comment