All the control commands don't work. ^C, ^Z while waiting for an input (but work on ubuntu 20.04)
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
ncurses (Ubuntu) |
New
|
Undecided
|
Unassigned |
Bug Description
Description: Ubuntu 22.04.2 LTS
Release: 22.04
libncurses6:
Installed: 6.3-2
Candidate: 6.3-2
Version table:
*** 6.3-2 500
500 http://
100 /var/lib/
While writting a c++ program with the library ncurses at first on Ubuntu 20.04 then I upgraded to Ubuntu 22.04. I have encountered a problem while waiting for an input from the user. The same code below works perfectly with Ubuntu 20.04 (all the controls command ^C, ^Z work) but not in Ubuntu 22.04.
Here is the code in c++
std::string DrawGame:
std::string input;
// let the terminal do the line editing
nocbreak();
echo();
int ch = mvwgetch(cli, 1, 1);
while ( ch != '\n' )
{
ch = mvwgetch(cli, 1, 1);
}
return input;
}
Where cli is a window previously created. The problem is that the controls commands are taken as a char in the string "input" instead of stopping the program with ^C for example. Same for ^Z.
I report this as a bug becouse there is no problem on Ubuntu 20.04.