FUDforum
Fast Uncompromising Discussions. FUDforum will get your users talking.

Home » Imported messages » comp.lang.php » ncurses on Linux how to capture F1 key?
Show: Today's Messages :: Polls :: Message Navigator
Return to the default flat view Create a new topic Submit Reply
Re: ncurses on Linux how to capture F1 key? [message #178757 is a reply to message #178756] Sat, 28 July 2012 14:15 Go to previous messageGo to previous message
Jerry Stuckle is currently offline  Jerry Stuckle
Messages: 2598
Registered: September 2010
Karma:
Senior Member
On 7/28/2012 9:21 AM, J.O. Aho wrote:
> Jerry Stuckle wrote:
>> On 7/28/2012 7:50 AM, crankypuss wrote:
>>> On 07/28/2012 05:45 AM, dickey(at)his(dot)com wrote:
>>>> On Friday, July 27, 2012 12:29:53 PM UTC-4, crankypuss wrote:
>>>> > On 07/27/2012 05:00 AM, dickey(at)his(dot)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"?
>>>>
>>>> On a non-GUI login, I wouldn't expect a help-menu (puzzled there).
>>>> For xterm in a desktop, I suppose it's possible for the window-manager
>>>> to have F1 bound (Mac OS X's settings do this with some of the
>>>> function keys, though I've disabled most of those...).
>>>>
>>>
>>> On the non-GUI login the F1 key is readily available.
>>>
>>> Other keys, like ctl-C and ctl-alt-D are firmly bound.
>>>
>>> Can you offer any information about how to modify this on Linux? I'm
>>> relatively new to Linux and don't know where that is controlled.
>>
>> Try a Linux newsgroup.
>
> Quite bored of crankys posts, so I hope he will not. 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:
> 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.
>
>
> I guess his program is waiting for a return which you don't get when you
> just press a function key.
>

Which has absolutely nothing to do with his question - which is why I
suggested a Linux newsgroup.

> As he is a gnome2 fan boy, 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).
>

That may be closer to his question, but it's hard to tell without more
information. And there are much better newsgroups to get his answer.

--
==================
Remove the "x" from my email address
Jerry Stuckle
JDS Computer Training Corp.
jstucklex(at)attglobal(dot)net
==================
[Message index]
 
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Previous Topic: strip_tags function
Next Topic: Is my array understanding correct?
Goto Forum:
  

-=] Back to Top [=-
[ Syndicate this forum (XML) ] [ RSS ]

Current Time: Thu Nov 28 23:44:26 GMT 2024

Total time taken to generate the page: 0.04902 seconds