Non blocking keyboard in curses

Anything QL Software or Programming Related.
Post Reply
User avatar
XorA
Site Admin
Posts: 1365
Joined: Thu Jun 02, 2011 11:31 am
Location: Shotts, North Lanarkshire, Scotland, UK

Non blocking keyboard in curses

Post 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.


User avatar
tofro
Font of All Knowledge
Posts: 2700
Joined: Sun Feb 13, 2011 10:53 pm
Location: SW Germany

Re: Non blocking keyboard in curses

Post by tofro »

I seem to distantly recall that a small (1 tick) delay worked better on the QL than nodelay().


ʎɐqǝ ɯoɹɟ ǝq oʇ ƃuᴉoƃ ʇou sᴉ pɹɐoqʎǝʞ ʇxǝu ʎɯ 'ɹɐǝp ɥO
User avatar
XorA
Site Admin
Posts: 1365
Joined: Thu Jun 02, 2011 11:31 am
Location: Shotts, North Lanarkshire, Scotland, UK

Re: Non blocking keyboard in curses

Post 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!


User avatar
XorA
Site Admin
Posts: 1365
Joined: Thu Jun 02, 2011 11:31 am
Location: Shotts, North Lanarkshire, Scotland, UK

Re: Non blocking keyboard in curses

Post by XorA »

Confirmed halfdelay(1) works as effectively non blocking thanks!


Post Reply