title: wgetch is not detecting KEY_UP etc
body: <p>I have enabled keypad for my_win and yet when I press KEY_UP after running the program, nothing happens. The stranger thing is that it works completely fine with stdscr. It appears to only be an issue with my_win.</p>
  <pre><code>/* Selects different elements of the list */
      while ((ch = wgetch(my_win)) != 'q')
      {
          sprintf(item, &quot;%-12s&quot;, list[i]);
          mvwprintw(my_win, i + 1, 2, &quot;%s&quot;, item);
  
          switch(ch)
          {
              case KEY_LEFT:
                  destroy_win(my_win);
                  my_win = create_newwin(height, width, starty,--startx);
                  wprintw(my_win, &quot;This is some text&quot;);
                  wrefresh(my_win);
                  break;
              case 'd':
                  destroy_win(my_win);
                  my_win = create_newwin(height, width, starty,++startx);
                  wprintw(my_win, &quot;This is some text&quot;);
                  wrefresh(my_win);
                  break;
              case 'w':
                  destroy_win(my_win);
                  my_win = create_newwin(height, width, --starty,startx);
                  wprintw(my_win, &quot;This is some text&quot;);
                  wrefresh(my_win);
                  break;
              case 's':
                  destroy_win(my_win);
                  my_win = create_newwin(height, width, ++starty,startx);
                  wprintw(my_win, &quot;This is some text&quot;);
                  wrefresh(my_win);
                  break;  
              case KEY_UP:
                  i--;
                  i = (i &lt; 0) ? 4 : i;
                  break;
              case KEY_DOWN:
                  i++;
                  i = (i &lt; 0) ? 4 : i;
                  break;
          }
  </code></pre>