ID: 21068
User updated by: [EMAIL PROTECTED]
Reported By: [EMAIL PROTECTED]
Status: Open
Bug Type: Unknown/Other Function
Operating System: SuSE 8.0
PHP Version: 4.3.0RC3
New Comment:
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)
Previous Comments:
------------------------------------------------------------------------
[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