Internals of ncurses: console input

118 views Asked by At

How exactly does Ncurses capture input into the console? I would like to implement it myself instead of using ncurses due to the overhead that ncurses is causing.

Thanks!

1

There are 1 answers

0
Some programmer dude On BEST ANSWER

Very short and basically: It might use the TTY ioctl calls to get and set flags needed for the different modes. Then it could simply use read to read characters in a blocking or non-blocking manner.

Special keys (like the function keys for example) are read using multiple characters which are parsed.