What to use for conio?

Lars Eighner luvbeastie at larseighner.com
Sat Sep 15 01:12:14 PDT 2007


What I really want to do:  capture keypresses (including function keys) from
a (virtual) terminal without their echoing or without having to enter
a new line (i.e. hit return).

Why I do not want to use (n)curses: to use keypad in ncurses, I have
to initscr() and ncurses will then blank the screen and seize the terminal.
I do not want that to happen.  I want to write ANSI directly to the terminal
and get non-echoing keypresses back.

Why I think I need something like conio:  I think I could get stdio to do
what I want if I had something like kbdhit from conio, but conio doesn't
exist pretty much anywhere outside of DOS.  I'm pretty sure the system
conSio is not anything like what I want.

So how can I get non-echoing keypress without turning my terminal over to
the tender mercies of ncurses?

-- 
Lars Eighner
http://www.larseighner.com/index.html
8800 N IH35 APT 1191 AUSTIN TX 78753-5266



More information about the freebsd-questions mailing list