Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.lang.php > #6707
| From | Norman Peelman <npeelmandog@cfl.rr.com> |
|---|---|
| Newsgroups | comp.lang.php |
| Subject | Re: ncurses on Linux how to capture F1 key? |
| Date | 2012-08-01 07:34 -0400 |
| Organization | A noiseless patient Spider |
| Message-ID | <jvb483$9s8$1@dont-email.me> (permalink) |
| References | <jutra212bev@news6.newsguy.com> <591cbfc9-6e5f-497d-b84d-c225c1fbbce9@googlegroups.com> <juufm301b7q@news3.newsguy.com> <jva33r$fdf$1@dont-email.me> <jvaq8702uck@news4.newsguy.com> |
On 08/01/2012 04:43 AM, crankypuss wrote: > On 07/31/2012 08:08 PM, Norman Peelman wrote: >> On 07/27/2012 12:29 PM, crankypuss wrote: >>> On 07/27/2012 05:00 AM, dickey@his.com wrote: >>>> On Friday, July 27, 2012 6:42:09 AM UTC-4, crankypuss wrote: >>>>> Using the C interface the incantation is "keypad(stdscr, >>>>> TRUE)" >>>>> >>>>> What is the equivalent using the PHP interface to ncurses? >>>>> >>>>> Pressing F1 just brings up gnome help (running in xterm under ubuntu >>>>> 11.10). >>>> >>>> that sounds as if you're using one of the vte-based hacks such as >>>> gnome-terminal, >>>> which hijack some keys - have to fix that by undoing the item in their >>>> respective >>>> setup dialogs. >>>> >>> >>> I'm using "xterm" and also on a cli (non-GUI) login... terminal type is >>> either "xterm" or "linux". Less stuff grabbed as Linux console. >>> >>> Any additional pointers/keywords I can use to find out more about >>> "undoing the item"? >>> >>> Thanks. >> >> You can turn off the shortcuts by going to: >> Edit->Keyboard Shortcuts >> >> ...scroll down to Help->Contents and double-click the 'F1' entry and >> press 'Backspace' to disable it. Can this be done programmatic-ally? I >> don't know. > > I don't want to turn my Linux installation into a mutant, I just want to > be able to run a mutant program on it. > >> As an aside if I remember correctly what little I've done in >> (php)ncurses when checking for those 'special' keys, they return a >> multi-byte sequence... so based on the first result you may need to do >> another getchar (or whatever it's called) as well. I do believe the >> arrow keys and F# keys meet this requirement. > > Some do, some don't. Trying to support every known obsolete terminal > does kind of kick the ability to use current physical console hardware > in the crotch. I foresee much reading of C-language source code and much > swearing prior to throwing up my hands and rewriting who-knows-what, and > I'm not liking that nightmare, done it too many times before. Aha! This setting can be found in the GConf editor (registry): Apps->gnome-terminal->keybindings Setting to 'disabled' turned it off. This disabled F1 for all 'gnome-terminal's that I opened after changing the setting. The setting is applied -on-the-fly- and is immediately reflected in (all) open gnome-terminals. You can script (php->exec/system) this, take a look: http://commons.oreilly.com/wiki/index.php/Ubuntu_Hacks/The_Linux_Desktop http://commons.oreilly.com/wiki/index.php/Ubuntu_Hacks/The_Linux_Desktop#Scripting_GConf http://webnesbay.com/configure-your-gnome-desktop-environment-using-gconftool-in-ubuntu-linux/ That should do what you want... as for the actual grabbing of the keys, I don't have (php)ncurses set up on this machine (or one that's handy at the moment) to try. There are some user notes here you may be interested in: http://www.php.net/manual/en/function.ncurses-getch.php -- Norman Registered Linux user #461062 -Have you been to www.php.net yet?-
Back to comp.lang.php | Previous | Next — Previous 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