ID: 21068 Updated by: [EMAIL PROTECTED] Reported By: [EMAIL PROTECTED] Status: Bogus Bug Type: Unknown/Other Function Operating System: SuSE 8.0 PHP Version: 4.3.0RC3 New Comment:
Forgot to say that you have to enable keypad for wgetch via ncurses_keypad($win, TRUE); Georg Previous Comments: ------------------------------------------------------------------------ [2002-12-18 04:54:39] [EMAIL PROTECTED] Thank you for taking the time to write to us, but this is not a bug. Please double-check the documentation available at http://www.php.net/manual/ and the instructions on how to report a bug at http://bugs.php.net/how-to-report.php Note that not all function keys are supported on any particular terminal. If you need F-Keys remove your putenv(...) ------------------------------------------------------------------------ [2002-12-17 11:40:39] [EMAIL PROTECTED] maybe this is not a bug, maybe if it is it's not related to php but to ncurses 5.3 which I use, in this case anyone know a workaround (not to rewrite a php getch which can handle different key sequences). Now the result is correct if I don't use window ($ch=265), wgetch return the sequence $ch=(27, 91, 91, 65) ------------------------------------------------------------------------ [2002-12-17 11:33:01] [EMAIL PROTECTED] <?php // francesco riosa, ncurses test, 20021217 // telnet client = putty // use "e" = exit ; "w" window // see the difference of the function keys inside and outside the window putenv("TERM=linux"); ncurses_init(); $i=0; ncurses_move($i++, 1); ncurses_addstr("NCURSES_KEY_F1=" . NCURSES_KEY_F1 ); while ($ch <> ord('e')) { $ch = ncurses_getch(); ncurses_move($i++, 1); ncurses_addstr("key --$ch--"); if ($ch == ord('w')) { $winhandle = ncurses_newwin( 20, 40, $i++, 4); $j=1; ncurses_wborder($winhandle,0,0,0,0,0,0,0,0); while ($ch <> ord('e')) { $ch = ncurses_wgetch($winhandle); ncurses_wmove($winhandle, $j++, 1); ncurses_waddstr($winhandle, "key --$ch--"); } } } ncurses_end(); ?> ------------------------------------------------------------------------ -- Edit this bug report at http://bugs.php.net/?id=21068&edit=1