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 #178769 is a reply to message #178767] Tue, 31 July 2012 10:43 Go to previous messageGo to previous message
crankypuss is currently offline  crankypuss
Messages: 147
Registered: March 2011
Karma:
Senior Member
On 07/30/2012 12:53 PM, Richard wrote:
> [Please do not mail me a copy of your followup]
>
> crankypuss <no(at)email(dot)thanks> spake the secret code
> <jv0jmp12jel(at)news7(dot)newsguy(dot)com> thusly:
>
>> On the non-GUI login the F1 key is readily available.
>>
>> Other keys, like ctl-C and ctl-alt-D are firmly bound.
>
> If you're using curses, you need to put the terminal in 'cbreak' mode.
> From the man pages:
>
> "The cbreak routine disables line buffering and erase/kill
> character-processing (interrupt and flow control characters are
> unaffected), making characters typed by the user immediately available
> to the program. The nocbreak routine returns the terminal to normal
> (cooked) mode."

I've been using cbreak mode since day-1 or at least day-1.5

It seems clear at this point that layers running "below" ncurses are
limiting its usefulness by taking over certain keys for their cutsie
menus and so forth. I had hoped that there was some even-lower-level
Linux system facility that nurses could use to get some control back but
apparently not, apparently I'll need to go on some quest to find out who
the heck "owns" the terminal and see how things can be dealt with more
usefully.

I might need to entirely abandon ncurses as useless for my purposes and
work through the fugliness of html since at least browsers serve up a
level of cross-system consistency. But I really don't want to give up
the key-by-key responsiveness that ncurses in cbreak mode provides, and
I really don't want to deal with the security issues of having a local
apache server involved in a lower-level utility's interface.

Thanks to all those who attempted to help.
[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: Fri Sep 20 04:31:54 GMT 2024

Total time taken to generate the page: 0.05401 seconds