howto get pgUp, pgDn, delete, home and end keycodes in CLI PHP script

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



I am trying to code a CLI PHP script that will give me the keycodes for these (and other) keyboard keys. I want to basically block until the user presses a single key, then I want to process that event without the user having to press the Enter key after pressing a single key.

I have tried several approaches but with no success. Using fopen() to open stdin, and fgetc() will give me the regular keys but requires the user to press the Enter key after the initial key is pressed. When I press the the PgDw key for example, those routines return a single character string even though the stty echos a 5 character string (using PgDw echos "^[[6~")

I have tried other approaches using bash read commands to get a single character but will little success also.

Anybody here know how to do this?

Thanks,

-Andres

|
|

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



[Index of Archives]     [PHP Home]     [Apache Users]     [PHP on Windows]     [Kernel Newbies]     [PHP Install]     [PHP Classes]     [Pear]     [Postgresql]     [Postgresql PHP]     [PHP on Windows]     [PHP Database Programming]     [PHP SOAP]

  Powered by Linux