🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: comp.windows.misc
Article #620

Curses: problem with getch while keypad is set

#620
From: Henk Fictorie
Date: Mon, 20 May 1991 14:09
28 lines
1254 bytes
I'm using the xopen version of curses in Ultrix 4.0.
I want to use the cursor keys to move through an itemlist,
some normal keys are used to execute commands.
So I did basically this:

keypad(stdscr, TRUE);
for (;;)
{
   key = getch();
   switch key
   {
   }
}

I do have several other windows and pads which are part of the
screen.

The problem is that getch sometimes doesn't respond or returns the
wrong value on normal keys. It seems to depend on whats actually on
the screen. Did anyone see this problem before and did you solve
it?

If enough interest, I will summarize the responses to the net.

--
Henk Fictorie, PTT Research Neher Labs,    H_Fictorie@pttrnl.nl
P.O. box 421,                              ...!hp4nl!dnlunx!henkf
2260 AK Leidschendam, The Netherlands      Phone    : +31 70 3326356 
Technical Details
Message-ID: <fictorie.674748548@freyr>
Path: arc1-ca.pugleaf.net!utzoo!utgpu!news-server.csri.toronto.edu!rpi!think.com!mintaka!bloom-beacon!eru!hagbard!sunic!mcsun!hp4nl!dnlunx!freyr!fictorie

Show Full Headers
Complete Article Headers
Path: arc1-ca.pugleaf.net!utzoo!utgpu!news-server.csri.toronto.edu!rpi!think.com!mintaka!bloom-beacon!eru!hagbard!sunic!mcsun!hp4nl!dnlunx!freyr!fictorie
From: fictorie@freyr.pttrnl.nl (Henk Fictorie)
Newsgroups: comp.windows.misc
Subject: Curses: problem with getch while keypad is set
Keywords: keypad, curses, Ultrix
Message-ID: <fictorie.674748548@freyr>
Date: 20 May 91 14:09:08 GMT
Sender: news@dnlunx.pttrnl.nl
Lines: 28