How can I set RAW terminal mode using tcsetaddr()? - Unix

This is a discussion on How can I set RAW terminal mode using tcsetaddr()? - Unix ; Hi What flags/options do I set in the termios structure passed to tcsetaddr() to achieve raw mode so that control characters on the keyboard are passed to the program and not interpreted by the terminal driver? Or will I have ...

+ Reply to Thread
Results 1 to 3 of 3

Thread: How can I set RAW terminal mode using tcsetaddr()?

  1. How can I set RAW terminal mode using tcsetaddr()?

    Hi

    What flags/options do I set in the termios structure passed to
    tcsetaddr() to achieve raw mode so that control characters on the
    keyboard are passed to the program and not interpreted by the terminal
    driver? Or will I have to use an ioctl() call? There doesn't seem to
    be anything in google about it.

    Thanks for any help

    B2003


  2. Re: How can I set RAW terminal mode using tcsetaddr()?

    Boltar wrote:
    > Hi
    >
    > What flags/options do I set in the termios structure passed to
    > tcsetaddr() to achieve raw mode so that control characters on the
    > keyboard are passed to the program and not interpreted by the terminal
    > driver? Or will I have to use an ioctl() call? There doesn't seem to
    > be anything in google about it.
    >
    > Thanks for any help
    >
    > B2003
    >



    I did an strace of an application that sets to raw mode - these were the
    ioctl calls....


    ioctl(0, TIOCGWINSZ, {ws_row=71, ws_col=114, ws_xpixel=818,
    ws_ypixel=927}) = 0
    ioctl(0, SNDCTL_TMR_TEMPO or TCGETA, {B38400 opost isig icanon echo
    ....}) = 0
    ioctl(0, SNDCTL_TMR_SOURCE or TCSETA, {B38400 -opost -isig -icanon -echo
    ....}) = 0
    ioctl(0, SNDCTL_TMR_SOURCE or TCSETA, {B38400 opost isig icanon echo
    ....}) = 0

  3. Re: How can I set RAW terminal mode using tcsetaddr()?

    On Apr 2, 1:01 pm, Gianni Mariani wrote:
    > Boltar wrote:
    > > Hi

    >
    > > What flags/options do I set in the termios structure passed to
    > > tcsetaddr() to achieve raw mode so that control characters on the
    > > keyboard are passed to the program and not interpreted by the terminal
    > > driver? Or will I have to use an ioctl() call? There doesn't seem to
    > > be anything in google about it.

    >
    > > Thanks for any help

    >
    > > B2003

    >
    > I did an strace of an application that sets to raw mode - these were the
    > ioctl calls....
    >
    > ioctl(0, TIOCGWINSZ, {ws_row=71, ws_col=114, ws_xpixel=818,
    > ws_ypixel=927}) = 0
    > ioctl(0, SNDCTL_TMR_TEMPO or TCGETA, {B38400 opost isig icanon echo
    > ...}) = 0
    > ioctl(0, SNDCTL_TMR_SOURCE or TCSETA, {B38400 -opost -isig -icanon -echo
    > ...}) = 0
    > ioctl(0, SNDCTL_TMR_SOURCE or TCSETA, {B38400 opost isig icanon echo
    > ...}) = 0


    Thanks! Of course I meant tcsetattr , not tcsetaddr. I did eventually
    find a man page for a macro called cfmakeraw() but our system doesn't
    have it. The ISIG flag is what I needed though.

    B2003


+ Reply to Thread