Non-blocking getch(), ncurses

后端 未结 3 628
轻奢々
轻奢々 2020-12-03 01:06

I\'m having some problems getting ncurses\' getch() to block. Default operation seems to be non-blocking (or have I missed some initialization)? I would like it to work like

3条回答
  •  我在风中等你
    2020-12-03 01:54

    From a man page (emphasis added):

    The timeout and wtimeout routines set blocking or non-blocking read for a given window. If delay is negative, blocking read is used (i.e., waits indefinitely for input).

提交回复
热议问题