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

2012-05-04 Thread Andres Gonzalez
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

Re: [PHP] howto get pgUp, pgDn, delete, home and end keycodes in CLI PHP script

2012-05-04 Thread David OBrien
 On Fri, May 4, 2012 at 10:48 AM, Andres Gonzalez and...@packetstorm.comwrote: 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

Re: [PHP] howto get pgUp, pgDn, delete, home and end keycodes in CLI PHP script

2012-05-04 Thread Andres Gonzalez
David, Thank you for your response. The code does not run on my box. I get an undefined variable error on the: if ($buffer != ) { line. Also, I need the code to block until the user presses a single key. Plus, the fgets() routine does not return extended codes for pgUp, pgDn, etc, only codes

Re: [PHP] howto get pgUp, pgDn, delete, home and end keycodes in CLI PHP script

2012-05-04 Thread Stuart Dallas
On 4 May 2012, at 15:48, Andres Gonzalez wrote: 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

Re: [PHP] howto get pgUp, pgDn, delete, home and end keycodes in CLI PHP script

2012-05-04 Thread Andres Gonzalez
Thank you for your reply Stuart, I will look at ncurses extensions. -Andres Stuart Dallas wrote: On 4 May 2012, at 15:48, Andres Gonzalez wrote: 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