|
php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login |
PatchesPull RequestsHistoryAllCommentsChangesGit/SVN commits
[2002-12-17 11:40 UTC] maillist at pnpitalia dot it
[2002-12-18 04:54 UTC] georg@php.net
[2002-12-18 04:59 UTC] georg@php.net
|
|||||||||||||||||||||||||||||||||||||
Copyright © 2001-2025 The PHP GroupAll rights reserved. |
Last updated: Tue Nov 04 23:00:01 2025 UTC |
<?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(); ?>