Page 1 of 1

Non blocking keyboard in curses

Posted: Sun Aug 01, 2021 12:58 am
by XorA
I have been working on a curses driven program and I am hitting the problem that keyboard input is always blocking.

Probably something simple I have missed about QL.

raw() - is set
nodelay() - is set

wgetch() is still blocking though when docs say it should not be.

Re: Non blocking keyboard in curses

Posted: Sun Aug 01, 2021 9:43 am
by tofro
I seem to distantly recall that a small (1 tick) delay worked better on the QL than nodelay().

Re: Non blocking keyboard in curses

Posted: Sun Aug 01, 2021 7:48 pm
by XorA
tofro wrote:I seem to distantly recall that a small (1 tick) delay worked better on the QL than nodelay().
I’ll give that a go!

Re: Non blocking keyboard in curses

Posted: Sun Aug 01, 2021 8:34 pm
by XorA
Confirmed halfdelay(1) works as effectively non blocking thanks!