k-roychoudhury / seating_planner

A simple program to generate seating arrangements. Currently working on refactoring the project.
0 stars 0 forks source link

draw_menu() implementation issue with unix_specific::getchar() #2

Closed k-roychoudhury closed 3 years ago

k-roychoudhury commented 3 years ago

Need to fix the following section in "screens.cpp"

ch1 = unix_specific::getch(); if (ch1 == CARIAGE_RETURN) { system("clear"); return pointer; } ch2 = unix_specific::getch(); ch3 = unix_specific::getch();

if (!(ch1==27)&&(ch2=91)) { continue; }

k-roychoudhury commented 3 years ago

Problems arise if a single character input like (a, b, c ,d) is given followed by an arrow key. Since arrow keys are represented by three characters in linux, the logic collapses.