On 23 Apr 2002 at 0:25, Frank Heckenbach wrote:
Couperin wrote:
In programs compiled using the CRT unit, the keys /, *, -, + and ENTER of the numeric keypad are no longer availables (they display other characters). How to solve this problem ?
Does this happen only recently (since the update of PDCurses for DJGPP)?
It's an old problem I always had, I think, but it becomes really annoying. My version of PDCurses seems to be 2.4.
Which other characters do you get? Can you find out what codes they give in C (using curses). I'm not sure if PDCurses comes with an according test program, but AFAIK the corresponding tests from ncurses can also be used with PDCurses.
The problem appears with Readln I tried to write a little program : ***************************** Program keytest; Uses Crt; Const Escape = 256+27; Var Touche : Word; Caractere : Char; Function Bioskey(Commande:Integer):Integer;C; Begin Repeat Writeln('Press a key + ENTER'); Readln(Caractere); Writeln(Caractere,' : ',Ord(Caractere)); Writeln('Press the same key'); Touche := BiosKey(0); Writeln(Chr(Touche),' : ',Touche, ' (',Touche Shr 8,' * 256 + ',Touche And $00FF,')'); Writeln; Until Touche = Escape; End. ***************************** Here is the output I get :
Press a key + ENTER - - : 202 Press the same key / : 13615 (53 * 256 + 47)
Press a key + ENTER ¤ ¤ : 207 Press the same key * : 14122 (55 * 256 + 42)
Press a key + ENTER ð ð : 208 Press the same key - : 18989 (74 * 256 + 45)
Press a key + ENTER Ð Ð : 209 Press the same key + : 20011 (78 * 256 + 43)
Press a key + ENTER - - : 203 Press the same key : 7181 (28 * 256 + 13) *****************************
Of course, if I suppress "Uses Crt", everything is OK.
Thanks for your help. -- "Couperin"