do { printf("a\n"); Key = ngetchx(); if (Key == KEY_RIGHT && (CurrentItem != NUM_ITEMS)) CurrentItem++ ; if (Key == KEY_LEFT && (CurrentItem != 1)) CurrentItem-- ; } while (Key != KEY_ESC);