Mail Archives: djgpp/1996/06/13/20:22:34
Reply to message 3671946 from BOYLESGJ AT LION on 06/13/96 7:40AM
>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.
Just a question here... you ARE familiar with the way PCs handle
extended keystrokes, right? When you press PgUp or any other
special key, getch() returns first a zero, then the extended key code
for the key, in other words, you get TWO characters for every ONE key
you hit. Any competent programming manual will give you a list
of the extended keycodes.
Also, I don't know how curses handles these things specifically, but
there is no built-in support in DJGPP (or any compiler, for that matter) for
displaying extended keystrokes on the screen. You pretty much have
to write your own code to interpret them and manipulate them. Not to
mention that if a program like curses did have support for them, you'd
have to use some special functions to actually invoke said support.
John
- Raw text -