What is the equivalent to getch() & getche() in Linux?

后端 未结 6 2040
南方客
南方客 2020-11-22 05:53

I am not able to find the equivalent header file for conio.h in Linux.

Is there any option for getch() & getche() function in Linux?

6条回答
  •  轻奢々
    轻奢々 (楼主)
    2020-11-22 06:23

    I suggest you use curses.h or ncurses.h these implement keyboard management routines including getch(). You have several options to change the behavior of getch (i.e. wait for keypress or not).

提交回复
热议问题