Mail Archives: djgpp/1996/06/13/16:23:41
Xref: | news2.mv.net comp.lang.c++:90375 comp.os.msdos.djgpp:4928
|
From: | boylesgj AT lion DOT cs DOT latrobe DOT edu DOT au (Gregary J Boyles)
|
Newsgroups: | comp.lang.c++,comp.os.msdos.djgpp
|
Subject: | Curses question
|
Date: | 13 Jun 1996 11:40:49 GMT
|
Organization: | Comp.Sci & Comp.Eng, La Trobe Uni, Australia
|
Lines: | 31
|
Distribution: | world
|
Message-ID: | <4pouo1$535@lion.cs.latrobe.edu.au>
|
NNTP-Posting-Host: | lion.cs.latrobe.edu.au
|
To: | djgpp AT delorie DOT com
|
DJ-Gateway: | from newsgroup comp.os.msdos.djgpp
|
The following program successfully intercepts and displays most key
presses however it seems to fail when any of PgUp, PgDn, Ins or Del are
pressed. PgUp and PgDn actually cause the screen to scroll while Ins
sounds the bell. I assume that the operating system is actually
intercepting these keys before getch() below and the real program I am
writing needs access to the afore mentioned keys. Is there any way of
giving the program below exclusive access to PgUp etc.
#include <curses.h>
void main()
{
int Ch;
initscr();
noecho();
raw();
nodelay(stdscr,false);
leaveok(stdscr,true);
scrollok(stdscr,true);
immedok(stdscr,true);
keypad(stdscr,false);
do
{
Ch=getch();
printw("%d %c\n",Ch,Ch);
}
while (Ch!=32);
endwin();
}
- Raw text -