Re: ncurses on Linux how to capture F1 key? [message #178774 is a reply to message #178749] |
Wed, 01 August 2012 02:08 |
Norman Peelman
Messages: 126 Registered: September 2010
Karma:
|
Senior Member |
|
|
On 07/27/2012 12:29 PM, 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"?
>
> 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. 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.
--
Norman
Registered Linux user #461062
-Have you been to www.php.net yet?-
|
|
|