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 #178767 is a reply to message #178754] Mon, 30 July 2012 18:53 Go to previous messageGo to previous message
legalize+jeeves is currently offline  legalize+jeeves
Messages: 21
Registered: September 2010
Karma:
Junior Member
[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."

--
"The Direct3D Graphics Pipeline" free book <http://tinyurl.com/d3d-pipeline>
The Computer Graphics Museum <http://computergraphicsmuseum.org>
The Terminals Wiki <http://terminals.classiccmp.org>
Legalize Adulthood! (my blog) <http://legalizeadulthood.wordpress.com>
[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 02:28:52 GMT 2024

Total time taken to generate the page: 0.05615 seconds