ncurses_getch

(PHP 4 >= 4.1.0, PHP 5)

ncurses_getch -- Read a character from keyboard

Description

int ncurses_getch ( void )

Внимание

Эта функция является ЭКСПЕРИМЕНТАЛЬНОЙ. Поведение этой функции, ее имя и относящаяся к ней документация могут измениться в последующих версиях PHP без уведомления. Используйте эту функцию на свой страх и риск.

Внимание

К настоящему времени эта функция еще не была документирована; для ознакомления доступен только список аргументов.



ncurses_getch
php at kormoc dot com
22-Nov-2005 03:45
After banging my head over this for awhile, I discovered, you must use ncurses_keypad($window, true); to enable the arrow keys and f keys to work correctly.
joeldegan AT yahoo.com
16-Dec-2002 12:29
When using getch to capture KEY_* events remember that the keypad is arranged like this:

+-----+------+-------+
| A1  |  up  |  A3  |
+-----+------+-------+
|left |  B2  | right |
+-----+------+-------+
| C1  | down |    C3  |
+-----+------+-------+

You use has_key to capture these and act upon them.

man curs_getch for more info.
pablorNOSPAM at nkstudios dot net
13-Sep-2002 01:40
A custom php ncurses_getstr function..

<?php

function ncurses_getstr($strlen){
   for (
$x=0;$x<$strlen;$x++){
      
$string .= chr(ncurses_getch());
   }
   return
$string;
}

ncurses_init();
ncurses_addstr(ncurses_getstr(6));
ncurses_refresh();
ncurses_getch();
ncurses_end();

?>

<ncurses_flushinpncurses_getmaxyx>
 Last updated: Tue, 15 Nov 2005