I have a problem I haven't been able to solve in regard to abnormal action by the arrow keys under mingw. I am running PDCurses 2.6 under Win98SE. It occurs in the library I compiled and also in that distributed precompiled on mingw.org. When NUMLOCK is off, the arrow keys work normally, both on the number pad and on the separate arrow-key pad. When the NUMLOCK key is on, the number pad returns numbers and the arrow-key pad returns arrows, but the arrows now appear to be buffered. I see the effect in the testcurses program and also in the lynx browser compiled with this version of pdcurses.
When NUMLOCK is on and I press an arrow key, there is no cursor movement, but if I then turn off NUMLOCK and press an arrow key, all the previous keypresses are sent to the screen along with the new keypress. That is, if I press DOWN_ARROW twice, there would be no movement of the cursor. If I then turn off NUMLOCK and press DOWN_ARROW once, the cursor moves down three lines. I haven't been able to see where in the code this is occurring. I tried fixing the problem with arrow keys being reported as KEY_SHIFT_R by the input section of testcurses with the following patch, but that didn't affect the apparent buffering of the keypresses. Does anyone have any ideas? Doug --- pdcurses2.6/win32/pdckbd.c.ori 2002-12-17 03:18:34.000000000 -0800 +++ pdcurses2.6/win32/pdckbd.c 2003-09-01 11:43:06.000000000 -0800 @@ -518,7 +518,7 @@ switch(save_ip.Event.KeyEvent.wVirtualKeyCode) { case 16: /* shift */ - if ( SP->return_key_modifiers ) return KEY_SHIFT_R; + if ( SP->return_key_modifiers & SHIFT_PRESSED) return KEY_SHIFT_R; ignore_key = 1; break; case 17: /* control */ -- Doug Kaufman Internet: [EMAIL PROTECTED]