title: Can't get KEY_UP with ncurses
body: <p>i am trying to make a simple program to detect the UP key. here is my c code:</p>
  
  <pre><code>#include &lt;stdio.h&gt;
  #include &lt;ncurses.h&gt;
  
  int main() {
  
      initscr();
      noecho();
  
      printw("hello\n");
      refresh();
  
      int ch = getch();
      if (ch == KEY_UP) {
          printw("up!\n");
          refresh();
      }
  
      getch();
      endwin();
      return 0;
  }
  </code></pre>
  
  <p>when i compile and run the program, it doesn't work. when i press up key it just exits.</p>
  
  <p>thanks in advance.</p>