bug-ncurses
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

KEY_NPAGE problem


From: Marco Stolle
Subject: KEY_NPAGE problem
Date: Sat, 24 Nov 2001 13:03:43 +0100

Hello,

I a'm writing a program with a switch statement to get user input like:

while(((ch = wgetch(form_win_sti)) != KEY_F(1)))
        {

        switch(ch)
                {
                case KEY_DOWN:
                        form_driver(form_sti, REQ_NEXT_FIELD);
                         break;
               case KEY_UP:
                form_driver(form_sti, REQ_PREV_FIELD);
                break;
                case KEY_PPAGE:
                code to make the page behave like it should
                        break;
                case :KEY_NPAGE
                code to make the page behave like it should
                        break;
                case KEY_F(5): 
                key f5 activates a window where the user is asked if he wants 
to save the               
                result
                        break;
               default:
                        // If this is a normal character, it gets
                        // Printed
                        form_driver(form_sti, ch);
                        break;
          } //end switch
}//end while

The problem is when i use the page down key (KEY_NPAGE ) the loop activates 
first the case KEY_F(5):  code and after that it performce the code behind 
KEY_NPAGE 
is this bizar ? or am i missing something?

Thanx in advance     Marco






reply via email to

[Prev in Thread] Current Thread [Next in Thread]