Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.lang.php > #6689
| From | crankypuss <no@email.thanks> |
|---|---|
| Newsgroups | comp.lang.php |
| Subject | Re: ncurses on Linux how to capture F1 key? |
| Date | 2012-07-30 05:07 -0600 |
| Organization | NewsGuy - Unlimited Usenet $19.95 |
| Message-ID | <jv5ptn02t86@news4.newsguy.com> (permalink) |
| References | (4 earlier) <jv0jmp12jel@news7.newsguy.com> <jv0mie$ucp$2@dont-email.me> <a7i7agF3sfU1@mid.individual.net> <jv3185016jv@news3.newsguy.com> <a7kl88F2auU1@mid.individual.net> |
On 07/29/2012 05:31 AM, J.O. Aho wrote: > crankypuss wrote: >> On 07/28/2012 07:21 AM, J.O. Aho wrote: > >>> I suggest he would >>> read documentation for once, if he had done that he may have read the >>> following: >>> >>> Quoted from the ncurses_programming_howto: >> >> You quote the C-language interface documentation. Take a look at the >> close-to-nonexistent documentation for the PHP interface sometime. > > Yes, as that is what you have as the PHP is more or less a wrapper and > the C documentation is what is used as base to many of the extensions > for PHP. Unfortunately PHP doesn't provide a very "pure" interface to the C functionality, and what /is/ provided at the PHP level is "currently not documented; only its argument list is available", often with no argument definitions. It's a half-done interface, and some things that /are/ documented (like NCURSES_KEY_MAX) are undefined. > There is a short article in the devzone how to use ncurses, the code > there has no issues with function keys. I assume you are referring to: http://devzone.zend.com/173/using-ncurses-in-php/ I notice all the clever line-through semi-corrections there, very cute. In short, it's pablum. It fails to even *address* the idea of function keys, and doesn't mention little details like extended-attributes clashing with user-defined colors. I've been looking at similar entry-level writeups for months. Of all the PHP-ncurses descriptions and "tutorials" I've found on the web (and there are dozens) I saw only /one/ article that even mentioned one of the two ways to implement a non-blocking getch() using only PHP functionality. Yeah, if you want something really simple, those babytalk articles are just fine... at least, better than nothing. >>> Normally the terminal driver buffers the characters a user types until a >>> new line or carriage return is encountered. But most programs require >>> that the characters be available as soon as the user types them. The >>> above two functions are used to disable line buffering. The difference >>> between these two functions is in the way control characters like >>> suspend (CTRL-Z), interrupt and quit (CTRL-C) are passed to the program. >>> In the raw() mode these characters are directly passed to the program >>> without generating a signal. In the cbreak() mode these control >>> characters are interpreted as any other character by the terminal >>> driver. >> >> The code is running in cbreak() mode. >> >>> I guess his program is waiting for a return which you don't get when you >>> just press a function key. >>> >>> As he is a gnome2 fan boy, >> >> Jump to fewer conclusions. If I were a gnome2 fanboy I'd be using >> something >> like GTK+ > > What's the options, you provide so huge amount of information that you > can't do anything else than make conclusions, as there are nothing to go > on and you said you "F1 just brings up gnome help". No examples of your > code or nothing, it's like calling your local car shop and tell, "my car > don't start, what's wrong?". So you think I should post the 6700+ lines of partially complete interface code I've written to deal with ncurses in civilized fashion, plus the dozens (or hundreds) of support routines, *AND* the application code on top of that so you can whine about excessive information instead of just answering the question asked or ignoring it and going about your business? Not going to happen here, suck it up and deal. >>> he may need to disable the hot key F1 (if >>> it's possible in gnome2, as mr Havoc was so kind and thought the less >>> configuration options the less confused would the users be, so you can't >>> do half of the stuff you could do in Miguel de Icaza's Gnome). >> >> Indeed, in the Linux newsgroups people "like you" don't even know "if >> it's >> possible in gnome2". > > Gnome2 is made as limited as possible, as the project leader after > Miguel had an idea that end users are stupid, so to not make them > confused, remove all the configuration options from Gnome and if someone > complained about things, just call them trolls or delete their posts in > the forums and he even told Linus Torvalds that the creator of Linux > didn't understand how a graphical desktop should be when Torvalds > pointed out some of the short comings of Gnome2. Sort of like you thinking anyone who asks a question is stupid so just call them trolls and blow them off? Yeah, it's a despicable attitude. > Do you think that kind of management makes more experienced users want > to stick with Gnome2, no those switched to something else if they had > been using Gnome and not caring how to do this or that in Gnome2. There are lots of things that I think suck major ass, but I can't fix them all at once.
Back to comp.lang.php | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread
ncurses on Linux how to capture F1 key? crankypuss <no@email.thanks> - 2012-07-27 04:42 -0600
Re: ncurses on Linux how to capture F1 key? dickey@his.com - 2012-07-27 04:00 -0700
Re: ncurses on Linux how to capture F1 key? crankypuss <no@email.thanks> - 2012-07-27 10:29 -0600
Re: ncurses on Linux how to capture F1 key? dickey@his.com - 2012-07-28 04:45 -0700
Re: ncurses on Linux how to capture F1 key? crankypuss <no@email.thanks> - 2012-07-28 05:50 -0600
Re: ncurses on Linux how to capture F1 key? Jerry Stuckle <jstucklex@attglobal.net> - 2012-07-28 08:39 -0400
Re: ncurses on Linux how to capture F1 key? "J.O. Aho" <user@example.net> - 2012-07-28 15:21 +0200
Re: ncurses on Linux how to capture F1 key? Jerry Stuckle <jstucklex@attglobal.net> - 2012-07-28 10:15 -0400
Re: ncurses on Linux how to capture F1 key? crankypuss <no@email.thanks> - 2012-07-29 03:54 -0600
Re: ncurses on Linux how to capture F1 key? "J.O. Aho" <user@example.net> - 2012-07-29 13:31 +0200
Re: ncurses on Linux how to capture F1 key? crankypuss <no@email.thanks> - 2012-07-30 05:07 -0600
Re: ncurses on Linux how to capture F1 key? "J.O. Aho" <user@example.net> - 2012-07-30 18:27 +0200
Re: ncurses on Linux how to capture F1 key? Jerry Stuckle <jstucklex@attglobal.net> - 2012-07-29 21:13 -0400
Re: ncurses on Linux how to capture F1 key? crankypuss <no@email.thanks> - 2012-07-30 05:08 -0600
Re: ncurses on Linux how to capture F1 key? "Peter H. Coffin" <hellsop@ninehells.com> - 2012-07-30 07:09 -0500
Re: ncurses on Linux how to capture F1 key? Jerry Stuckle <jstucklex@attglobal.net> - 2012-07-30 10:39 -0400
Re: ncurses on Linux how to capture F1 key? legalize+jeeves@mail.xmission.com (Richard) - 2012-07-30 18:53 +0000
Re: ncurses on Linux how to capture F1 key? crankypuss <no@email.thanks> - 2012-07-31 04:43 -0600
Re: ncurses on Linux how to capture F1 key? "Peter H. Coffin" <hellsop@ninehells.com> - 2012-07-31 08:03 -0500
Re: ncurses on Linux how to capture F1 key? Norman Peelman <npeelmandog@cfl.rr.com> - 2012-07-31 22:08 -0400
Re: ncurses on Linux how to capture F1 key? crankypuss <no@email.thanks> - 2012-08-01 02:43 -0600
Re: ncurses on Linux how to capture F1 key? Norman Peelman <npeelmandog@cfl.rr.com> - 2012-08-01 07:34 -0400
csiph-web