linux-c-programming.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* Control key with Ncurses
@ 2003-07-03  7:00 Vidya Kotamraju
  2003-07-03  7:18 ` Glynn Clements
  0 siblings, 1 reply; 4+ messages in thread
From: Vidya Kotamraju @ 2003-07-03  7:00 UTC (permalink / raw)
  To: linux-c-programming

Hi all,

I am writing a graphics-based application in Linux by making use of C 
and ncurses library.
The application needs that i take two numbers as input ( i make use of 
scanw for the same).
However at this point in the program i want the user to obtain the 
flexibility of exiting gracefully from the program(by pressing a cntrl 
key,like say F5).

Cntrl-D doesnt seem to work with ncurses..

Heres a snippet of the code.....



/*FORM INITIALIZATION*/

my_form = new_form(field);
post_form(my_form);
refresh();

mvprintw(1,8,"NOTE:THE ROW AND COLUMN ARE AS DEFINED IN MATRIXALGEBRA");
mvprintw(2,8,"Enter the row and column coordinates(i and j values):");

mvprintw(3,8,"i and j: ");
scanw("%d %d",&i,&j);

// at this point i want to exit from the program if F5 key is pressed.



Any pointers ?

Regards,
Vidya

-- 
--------------------------------------------------------------------------
As far as the laws of mathematics refer to reality,they are not certain;
and as far as they are certain, they do not refer to reality.
                                       - Albert Einstein (1879-1955)
--------------------------------------------------------------------------
Kotamraju Vidya
Marine HydroDynamics Lab,
Physical Oceanography Division,
National Institute of Oceanography,
Dona Paula, Goa 403 004, India.
Ph.: +91-832-2456700 *4400 (O)
      +91-832-2541756 (R)
e-mail: vidyakr@darya.nio.org


^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2003-07-04 14:47 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2003-07-03  7:00 Control key with Ncurses Vidya Kotamraju
2003-07-03  7:18 ` Glynn Clements
2003-07-04 10:44   ` Vidya Kotamraju
2003-07-04 14:47     ` Glynn Clements

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).